Skip to main content
Glama

Read Note

read_note
Read-onlyIdempotent

Retrieve the full text of any note using its unique ID. Access stored note content directly from Apple Notes.

Instructions

Read the full content of a specific note by its ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesNote ID (x-coredata:// format)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
nameYes
bodyYes
plaintextYes
creationDateYes
modificationDateYes
folderYes
sharedYes
passwordProtectedYes

Implementation Reference

  • The handler function for the 'read_note' tool. It receives the note ID, executes the JXA script (readNoteScript) to retrieve note details, checks shared access via guardSharedAccess, and returns the note data as untrusted structured output.
    async ({ id }) => {
      try {
        const result = await runJxa<NoteDetail>(readNoteScript(id));
        const blocked = await guardSharedAccess(result.shared, config, "notes", "read_note", { id });
        if (blocked) return errPermission(blocked);
        return okUntrustedStructured(result);
      } catch (e) {
        return errJxaFor("read note", e);
      }
    },
  • Input/output schema and metadata for 'read_note'. Input requires an 'id' string; output includes id, name, body, plaintext, creationDate, modificationDate, folder, shared, and passwordProtected booleans.
    inputSchema: {
      id: z.string().max(500).describe("Note ID (x-coredata:// format)"),
    },
    outputSchema: {
      id: z.string(),
      name: z.string(),
      body: z.string(),
      plaintext: z.string(),
      creationDate: z.string(),
      modificationDate: z.string(),
      folder: z.string(),
      shared: z.boolean(),
      passwordProtected: z.boolean(),
    },
  • Registration of the 'read_note' tool via server.registerTool with its schema, annotations, and handler callback.
    server.registerTool(
      "read_note",
      {
        title: "Read Note",
        description: "Read the full content of a specific note by its ID. Returns HTML body and plaintext.",
        inputSchema: {
          id: z.string().max(500).describe("Note ID (x-coredata:// format)"),
        },
        outputSchema: {
          id: z.string(),
          name: z.string(),
          body: z.string(),
          plaintext: z.string(),
          creationDate: z.string(),
          modificationDate: z.string(),
          folder: z.string(),
          shared: z.boolean(),
          passwordProtected: z.boolean(),
        },
        annotations: {
          readOnlyHint: true,
          destructiveHint: false,
          idempotentHint: true,
          openWorldHint: false,
        },
      },
      async ({ id }) => {
        try {
          const result = await runJxa<NoteDetail>(readNoteScript(id));
          const blocked = await guardSharedAccess(result.shared, config, "notes", "read_note", { id });
          if (blocked) return errPermission(blocked);
          return okUntrustedStructured(result);
        } catch (e) {
          return errJxaFor("read note", e);
        }
      },
    );
  • The readNoteScript function that generates a JXA (JavaScript for Automation) script string. This script uses Apple's Notes application to find a note by ID and returns its id, name, body, plaintext, creationDate, modificationDate, folder, shared, and passwordProtected fields as JSON.
    export function readNoteScript(id: string): string {
      return `
        const Notes = Application('Notes');
        const note = Notes.notes.byId('${esc(id)}');
        JSON.stringify({
          id: note.id(),
          name: note.name(),
          body: note.body(),
          plaintext: note.plaintext(),
          creationDate: note.creationDate().toISOString(),
          modificationDate: note.modificationDate().toISOString(),
          folder: note.container().name(),
          shared: note.shared(),
          passwordProtected: note.passwordProtected()
        });
      `;
    }
Behavior4/5

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

Annotations already provide readOnlyHint, destructiveHint, idempotentHint, and openWorldHint. The description adds that the tool returns 'full content', which tells the agent it returns the complete body, not just metadata. This adds value beyond the annotations.

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

Conciseness5/5

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

The description is a single, front-loaded sentence of 10 words. Every word is necessary; no filler. Ideal conciseness for a simple tool.

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 output schema exists (mentioned in context signals), the description and annotations are likely sufficient for an agent to understand what the tool returns. However, missing information about error handling (e.g., ID not found) or that it only returns one note. Still, overall adequate for a simple read.

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 coverage is 100% with one parameter 'id' described as 'Note ID (x-coredata:// format)'. The description does not add any additional meaning or examples. Baseline 3 is appropriate as the schema already handles parameter documentation.

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 verb 'Read', the resource 'full content of a specific note', and the method 'by its ID'. It distinguishes this tool from siblings like list_notes (which lists titles) and search_notes (which finds notes).

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

Usage Guidelines4/5

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

The description implicitly indicates use when you have a note ID and want full content. However, it lacks explicit guidance on when not to use it or alternatives (e.g., using list_notes to get IDs first). Still, clarity is high for a simple read operation.

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

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/heznpc/AirMCP'

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