Skip to main content
Glama
9Ninety
by 9Ninety

listNotes

Search and list all notes or filter them by specific tags to quickly find relevant information in your MCP Notes server.

Instructions

Lists all notes, or search notes with tags you seen in previous list operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNoOptional tags to filter notes. do not specify this if you didn't certainly sure what tags you want.

Implementation Reference

  • The core handler function for the 'listNotes' tool. It performs a ScanCommand on the DynamoDB table, optionally filters by tags, simplifies the note data, updates the global ALL_RESOURCES list with note resources, and returns a formatted content response with note count and JSON list.
    export const handleListNotes = async (
      docClient: DynamoDBDocumentClient,
      tableName: string,
      ALL_RESOURCES: Resource[],
      tags?: string[]
    ) => {
      const scanParams: any = { TableName: tableName };
    
      if (tags && tags.length > 0) {
        scanParams.FilterExpression = "tags IN (:tags)";
        scanParams.ExpressionAttributeValues = {
          ":tags": tags,
        };
      }
    
      const command = new ScanCommand(scanParams);
      const response = await docClient.send(command);
      const notes = (response.Items as Note[]) || [];
    
      const simplifiedNotes = notes.map((note) => ({
        id: note.id,
        title: note.title,
        summary: note.summary,
        tags: note.tags,
      }));
    
      ALL_RESOURCES.length = 0;
      notes.forEach((note) => {
        ALL_RESOURCES.push({
          uri: `notes://notes/${note.id}`,
          name: note.title,
          mimeType: "application/json",
          text: JSON.stringify(note),
        });
      });
    
      return {
        content: [
          { type: "text", text: `Found ${notes.length} notes.` },
          { type: "text", text: JSON.stringify(simplifiedNotes) },
        ],
      };
    };
  • Zod input schema for the listNotes tool, defining an optional array of tags for filtering notes.
    export const ListNotesInputSchema = z.object({
      tags: z
        .array(z.string())
        .optional()
        .describe("Optional tags to filter notes. do not specify this if you didn't certainly sure what tags you want."),
    });
  • Tool registration in getTools() function, which returns the list of available tools including 'listNotes' with its name, description, and converted JSON input schema. This is used by the listTools handler.
    export const getTools = (): Tool[] => [
      {
        name: ToolName.LIST_NOTES,
        description:
          "Lists all notes, or search notes with tags you seen in previous list operation.",
        inputSchema: zodToJsonSchema(ListNotesInputSchema) as Tool["inputSchema"],
      },
  • Tool dispatch/execution routing in the CallToolRequestSchema handler's switch statement. Parses input with schema and calls the handleListNotes function.
    case ToolName.LIST_NOTES: {
      const { tags } = ListNotesInputSchema.parse(args);
      return handleListNotes(docClient, tableName, ALL_RESOURCES, tags);
    }
  • Enum definition for the tool name constant ToolName.LIST_NOTES = "listNotes".
    LIST_NOTES = "listNotes",
Behavior2/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 mentions the tool can list all notes or search with tags, but fails to describe critical behaviors: whether it's read-only (implied but not stated), how results are returned (e.g., pagination, format), error conditions, or any rate limits. This leaves significant gaps for an agent to understand operational traits.

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 concise with two clear clauses, front-loading the main purpose ('Lists all notes') and adding a secondary function ('or search notes with tags'). There's no wasted text, though the phrasing 'tags you seen in previous list operation' is slightly awkward but still functional.

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 the tool's moderate complexity (list/search functionality), lack of annotations, and no output schema, the description is insufficiently complete. It doesn't explain return values, error handling, or behavioral constraints, leaving the agent with incomplete operational context. This is a significant gap for a tool without structured support.

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 input schema has 100% description coverage, with the 'tags' parameter well-documented in the schema itself. The description adds minimal value beyond the schema by mentioning tags are for filtering and should be used only if certain, but doesn't provide additional context like tag format examples or interaction details. This meets the baseline for high schema coverage.

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 clearly states the tool's purpose: 'Lists all notes, or search notes with tags'. It specifies the verb ('Lists'/'search') and resource ('notes'), making the function understandable. However, it doesn't explicitly differentiate from sibling tools like 'getNote' (which presumably retrieves a single note) or mention scope limitations, preventing a perfect score.

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

Usage Guidelines3/5

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

The description provides some implied guidance: it suggests using tags for filtering based on previous operations ('tags you seen in previous list operation'), which hints at a workflow. However, it lacks explicit instructions on when to use this tool versus alternatives like 'getNote' for single notes or 'writeNote' for creation, and doesn't specify prerequisites or exclusions, leaving usage context incomplete.

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

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