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());
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: the tool returns notes by creation date only (not content search), has strict usage constraints, and implies read-only operation through 'retrieve.' However, it doesn't mention potential limitations like rate limits, pagination, or authentication requirements, leaving some behavioral aspects uncovered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded with the core purpose and usage rules. Every sentence serves a clear purpose: establishing usage constraints, describing functionality, and prohibiting misuse. While slightly repetitive with the 'note/notes' emphasis, it maintains efficiency without wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 required parameters, no output schema, no annotations), the description provides good contextual coverage. It explains what the tool does, when to use it, and behavioral constraints. The main gap is the lack of output format details (since no output schema exists), but the description compensates well with clear functional boundaries and usage rules.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, providing detailed format examples for both parameters. The description adds minimal parameter semantics beyond the schema, only mentioning 'between two dates' which is already implied by the parameter names. The baseline score of 3 is appropriate since the schema does the heavy lifting, though the description doesn't add meaningful additional context about parameter usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'retrieve notes between two dates' with specific verb+resource. It explicitly distinguishes from sibling tools by stating it 'does NOT search note content or filter by other criteria' and contrasts with tools like getContact, searchContacts, etc. The distinction from content search and other entity types is well-defined.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage rules: 'Use ONLY when the user explicitly mentions "note" or "notes"' and 'NEVER use this tool for finding contacts or any other purpose.' It gives concrete examples ('e.g. "what notes from last week?"') and clear prohibitions. The guidance is comprehensive with specific when/when-not conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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