Skip to main content
Glama

getNote

Retrieve specific notes by their unique ID using this tool, designed to simplify access to recorded information on the MCP Notes server for efficient note management.

Instructions

Retrieves a specific note by its ID.

Input Schema

NameRequiredDescriptionDefault
idYesID of the note to retrieve

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "id": { "description": "ID of the note to retrieve", "type": "string" } }, "required": [ "id" ], "type": "object" }

Implementation Reference

  • The handler function that implements the core logic of the getNote tool: retrieves a note from DynamoDB using GetCommand by ID and returns MCP-formatted content (JSON stringified note or not found message).
    export const handleGetNote = async ( docClient: DynamoDBDocumentClient, tableName: string, id: string ) => { const command = new GetCommand({ TableName: tableName, Key: { id } }); const response = await docClient.send(command); const note = response.Item as Note; return note ? { content: [ { type: "text", text: `Note found with ID '${id}':` }, { type: "text", text: JSON.stringify(note) }, ], } : { content: [{ type: "text", text: `Note with ID '${id}' not found.` }], }; };
  • Zod input schema for the getNote tool, validating a single 'id' string parameter.
    export const GetNoteInputSchema = z.object({ id: z.string().describe("ID of the note to retrieve"), });
  • Tool object registration for getNote in the MCP tools list returned by getTools(), used for listTools handler. Converts Zod schema to JSON schema.
    { name: ToolName.GET_NOTE, description: "Retrieves a specific note by its ID.", inputSchema: zodToJsonSchema(GetNoteInputSchema) as Tool["inputSchema"], },
  • Dispatch/registration in the CallToolRequest handler switch statement: parses input with schema and invokes the getNote handler.
    case ToolName.GET_NOTE: { const { id: getNoteId } = GetNoteInputSchema.parse(args); return handleGetNote(docClient, tableName, getNoteId); }
  • Enum value defining the tool name constant ToolName.GET_NOTE = 'getNote'.
    GET_NOTE = "getNote",

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/9Ninety/MCPNotes'

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