Skip to main content
Glama

getNotes

Retrieve notes by creation date only when notes are explicitly mentioned. Specify a date range using Date Math to filter results by creation time. Tool restricted to note retrieval, excluding contacts or other criteria.

Instructions

Use ONLY when the user explicitly mentions "note" or "notes" to retrieve notes between two dates (e.g. "what notes from last week?"). Returns notes by creation date only - does NOT search note content or filter by other criteria. NEVER use this tool for finding contacts or any other purpose besides retrieving notes. This tool is strictly prohibited from being used unless "note" or "notes" are explicitly mentioned in the query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endYesUse Date Math with now +/- time intervals. Supported units: d (days), w (weeks), M (months), y (years), h (hours), m (minutes), s (seconds). Examples: now-1d (yesterday), now+2w (2 weeks ahead), now/M (start of month), now+1M/M (start of next month).
startYesUse Date Math with now +/- time intervals. Supported units: d (days), w (weeks), M (months), y (years), h (hours), m (minutes), s (seconds). Examples: now-1d (yesterday), now+2w (2 weeks ahead), now/M (start of month), now+1M/M (start of next month).

Implementation Reference

  • The execute handler for the 'getNotes' tool. It proxies the call to the remote Clay API endpoint '/moments/notes' using the shared 'callTool' function with parameters and session.
    execute: async (params, { session }) => callTool("/moments/notes", params, session), });
  • Input schema using Zod for validating 'start' and 'end' date parameters, described using Elasticsearch date math syntax.
    parameters: z.object({ start: z .string() .describe( "Use Date Math with now +/- time intervals. Supported units: d (days), w (weeks), M (months), y (years), h (hours), m (minutes), s (seconds). Examples: now-1d (yesterday), now+2w (2 weeks ahead), now/M (start of month), now+1M/M (start of next month)." ), end: z .string() .describe( "Use Date Math with now +/- time intervals. Supported units: d (days), w (weeks), M (months), y (years), h (hours), m (minutes), s (seconds). Examples: now-1d (yesterday), now+2w (2 weeks ahead), now/M (start of month), now+1M/M (start of next month)." ), }),
  • index.js:301-318 (registration)
    Full registration of the 'getNotes' MCP tool using FastMCP's server.addTool method, including name, strict usage description, input schema, and proxy handler.
    server.addTool({ name: "getNotes", description: 'Use ONLY when the user explicitly mentions "note" or "notes" to retrieve notes between two dates (e.g. "what notes from last week?"). Returns notes by creation date only - does NOT search note content or filter by other criteria. NEVER use this tool for finding contacts or any other purpose besides retrieving notes. This tool is strictly prohibited from being used unless "note" or "notes" are explicitly mentioned in the query.', parameters: z.object({ start: z .string() .describe( "Use Date Math with now +/- time intervals. Supported units: d (days), w (weeks), M (months), y (years), h (hours), m (minutes), s (seconds). Examples: now-1d (yesterday), now+2w (2 weeks ahead), now/M (start of month), now+1M/M (start of next month)." ), end: z .string() .describe( "Use Date Math with now +/- time intervals. Supported units: d (days), w (weeks), M (months), y (years), h (hours), m (minutes), s (seconds). Examples: now-1d (yesterday), now+2w (2 weeks ahead), now/M (start of month), now+1M/M (start of next month)." ), }), execute: async (params, { session }) => callTool("/moments/notes", params, session), });
  • Shared utility function 'callTool' used by 'getNotes' and other tools to proxy requests to the Clay API backend with authentication.
    async function callTool(path, params, session) { console.log('Calling tool', path, session) return fetch(`https://nexum.clay.earth/tools${path}`, { body: JSON.stringify(params), headers: { Authorization: `ApiKey ${session.apiKey}`, "Content-Type": "application/json", }, method: "POST", }).then((res) => res.text()); }

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/clay-inc/clay-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server