MCP Server

Diary Tools exposes an MCP server so AI agents can work with contacts, draft email, and read synced calendar data — without building a custom API client.

There are eight tools. Directory tools return compact rows; get_contact is the full record.

Endpoint

URLhttps://app.diary.tools/api/mcp
TransportStreamable HTTP
Server namediary-tools

Authenticate with a Bearer token in the Authorization header.

Authentication

There are two common ways to authenticate:

  1. Agent API keys — create a long-lived key (agt_live_…) in the portal under Subscription → Agents / API keys. Best for OpenClaw and other automation hosts.
  2. Human OAuth — Cognito OAuth (PKCE) for interactive clients such as Claude or MCP Inspector. Use the access JWT as the Bearer token.

Agent keys support presets such as Read Only, User (default for automation), and Admin.

Example config

Portal Integrations → MCP shows a ready-made snippet. A typical OpenClaw-style config looks like:

{
  "mcp": {
    "servers": {
      "diary-tools": {
        "url": "https://app.diary.tools/api/mcp",
        "transport": "streamable-http",
        "headers": {
          "Authorization": "Bearer agt_live_…"
        }
      }
    }
  }
}

Replace the token with your agent key. Never commit live keys to source control.

IDs

Most contact tools take:

  • projectId — the project slug (for example personal)
  • contactId — the contact slug (for example jane-smith)

Use ids from list_contacts, open_threads, or search_contacts when you call get_contact or update_contact.

Compact directory vs full record

list_contacts, open_threads, and search_contacts return compact directory rows only: id, name, email, company, jobTitle, workflowStatus, and location. They omit notes, OSINT findings, previous roles, and other heavy fields so agents do not load the whole database into context.

Call get_contact when you need the full record.

Contact tools

ToolInputsWhat it does
list_contactsprojectId; optional limit (default 100, max 100), offsetCompact directory of contacts in a project
open_threadsprojectIdContacts with an open email thread (WaitingOnMe / WaitingOnThem). Compact rows
search_contactsprojectId, q (min 2 characters); optional limit (default 20, max 50), offsetFuzzy search by name, company, job title, or email. Compact rows
get_contactprojectId, contactIdFull contact, including notes and OSINT
update_contactprojectId, contactId, fieldsPatch CRM and OSINT fields. Use "REMOVE" or null to clear optional fields; name and email cannot be cleared

Email

ToolInputsWhat it does
send_emailprojectId, contactId, subject, body (markdown); optional replyToLatestThreadCreate a Gmail draft to a stored contact (not a raw address). Body is formatted, not rewritten. Returns a Gmail deep link — it does not auto-send

send_email requires Gmail connected on that project. See Connecting Gmail.

Calendar

These tools read data already synced into Diary Tools (not a live Google query). Connect Gmail first so calendar events and availability exist.

ToolInputsWhat it does
list_upcoming_calendar_eventsoptional projectId, optional to (ISO datetime or YYYY-MM-DD)Upcoming key events from now. Omit to to return all stored upcoming events
get_availability_slotsoptional from, optional to (ISO)Bookable 30-minute free slots within working hours. Defaults to now through the next 4 weeks. Returns { timezone, slots: [{ start, end }] }

Not in MCP

There is no create_contact, delete_contact, or dedicated OSINT-run tool. Add contacts in the portal, via Gmail sync, or the Chrome extension. Run OSINT from the contact page in the portal. Agents read enrichment with get_contact and patch it with update_contact.

Resources

The server also publishes MCP resources agents can read:

URIPurpose
skill://diary-toolsWhen and how to use the tools
skill://diary-tools/server-guideAuth, setup, IDs, and permissions

Tips

  • Use list_contacts for the directory, search_contacts to find someone, open_threads for open loops, and get_contact when you need notes or OSINT.
  • Prefer search_contacts before guessing ids.
  • List and search responses do not include OSINT.