Skip to main content
Glama

notes_get_recent_notes

Retrieve recently modified notes from macOS Notes app to access updated content quickly.

Instructions

Get recently modified notes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of notes to return (default: 10)

Implementation Reference

  • The handler logic for the 'notes_get_recent_notes' tool. It constructs and executes an AppleScript command via osascript to retrieve up to 'limit' (default 10) most recent notes from the macOS Notes app, including name and modification date, and returns formatted text output.
    case 'notes_get_recent_notes':
      try {
        const limit = (args?.limit as number) || 10;
        
        const command = `osascript -e 'on run argv
          set numLimit to (item 1 of argv) as number
          tell application "Notes"
            set recentNotes to {}
            set noteCount to 0
            repeat with aNote in notes
              if noteCount < numLimit then
                set noteName to name of aNote
                set modDate to modification date of aNote
                set end of recentNotes to (noteName & " (Modified: " & (modDate as string) & ")")
                set noteCount to noteCount + 1
              end if
            end repeat
            return recentNotes as string
          end tell
        end run' -- ${limit}`;
        
        const { stdout, stderr } = await execAsync(command);
        
        if (stderr.trim()) {
          return {
            content: [
              {
                type: 'text',
                text: `Error getting recent notes: ${stderr.trim()}`,
              },
            ],
          };
        }
        
        const output = stdout.trim();
        if (!output || output === '') {
          return {
            content: [
              {
                type: 'text',
                text: 'No notes found',
              },
            ],
          };
        }
        
        return {
          content: [
            {
              type: 'text',
              text: `Recent Notes (limit: ${limit}):\n${output}`,
            },
          ],
        };
      } catch (error: any) {
        return {
          content: [
            {
              type: 'text',
              text: `Error executing recent notes command: ${error.message}`,
            },
          ],
        };
      }
  • The tool schema definition, including name, description, and inputSchema with optional 'limit' parameter of type number.
    {
      name: 'notes_get_recent_notes',
      description: 'Get recently modified notes',
      inputSchema: {
        type: 'object',
        properties: {
          limit: {
            type: 'number',
            description: 'Maximum number of notes to return (default: 10)',
          },
        },
      },
    },
  • src/index.ts:149-161 (registration)
    Registration of the tool in the ListTools response, where it is listed among available tools with its schema.
    {
      name: 'notes_get_recent_notes',
      description: 'Get recently modified notes',
      inputSchema: {
        type: 'object',
        properties: {
          limit: {
            type: 'number',
            description: 'Maximum number of notes to return (default: 10)',
          },
        },
      },
    },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Get' implies a read operation, it doesn't specify what 'recently modified' means (timeframe criteria), whether results are sorted, what format they return, or any limitations. For a tool with zero annotation coverage, this leaves significant behavioral questions unanswered.

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 extremely concise at just three words ('Get recently modified notes'), front-loading the core purpose with zero wasted words. Every word earns its place in communicating the essential function.

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

Completeness2/5

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

Given no annotations, no output schema, and a read operation that likely returns structured data, the description is insufficient. It doesn't explain what 'recently modified' means, what data is returned, how results are ordered, or any limitations. For a tool that presumably returns multiple notes with timestamps, this leaves too much undefined.

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?

The schema has 100% description coverage with the 'limit' parameter clearly documented. The description doesn't add any parameter information beyond what's in the schema. With high schema coverage and only one parameter, the baseline score of 3 is appropriate - the schema does the heavy lifting for parameter documentation.

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

Purpose4/5

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

The description 'Get recently modified notes' clearly states the verb ('Get') and resource ('recently modified notes'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'notes_search_notes' or 'notes_get_folders' - it's clear what it does but not how it differs from alternatives.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'notes_search_notes' or 'notes_get_folders'. There's no mention of use cases, prerequisites, or when this tool would be preferred over other notes-related tools in the sibling list.

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/samicokar/mcp-mac'

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