Skip to main content
Glama
btn0s

Granola MCP Server

by btn0s

list_granola_documents

Retrieve and display all Granola documents with basic metadata using the Granola MCP Server. Specify a limit to control the number of documents returned.

Instructions

List all Granola documents with basic metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of documents to return (default: 50)

Implementation Reference

  • Handler for the 'list_granola_documents' tool. Retrieves all documents using apiClient.getAllDocuments(), limits them, and returns JSON with id, title, created_at, updated_at.
    case "list_granola_documents": {
      const limit = (args?.limit as number) || 50;
      const allDocs = await apiClient.getAllDocuments();
      const docs = allDocs.slice(0, limit);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              {
                count: docs.length,
                documents: docs.map((doc) => ({
                  id: doc.id,
                  title: doc.title || "Untitled",
                  created_at: doc.created_at,
                  updated_at: doc.updated_at,
                })),
              },
              null,
              2
            ),
          },
        ],
      };
    }
  • src/index.ts:136-150 (registration)
    Tool registration in the tools array, including name, description, and inputSchema.
      {
        name: "list_granola_documents",
        description: "List all Granola documents with basic metadata.",
        inputSchema: {
          type: "object",
          properties: {
            limit: {
              type: "number",
              description: "Maximum number of documents to return (default: 50)",
              default: 50,
            },
          },
        },
      },
    ];
  • Helper method getAllDocuments() in GranolaApiClient that paginates and fetches all Granola documents from the API using fetchDocuments.
    async getAllDocuments(): Promise<GranolaDocument[]> {
      const allDocs: GranolaDocument[] = [];
      let offset = 0;
      const limit = 100;
    
      while (true) {
        const docs = await this.fetchDocuments(limit, offset);
        if (docs.length === 0) {
          break;
        }
        allDocs.push(...docs);
        offset += limit;
        if (offset > 10000) {
          break;
        }
      }
    
      return allDocs;
    }
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 states it 'List[s] all Granola documents with basic metadata,' which implies a read-only, non-destructive operation, but doesn't clarify permissions, rate limits, pagination, or what 'basic metadata' includes. For a tool with no annotation coverage, this is insufficient.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, with every part contributing essential information. This exemplifies conciseness.

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

Completeness3/5

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

Given the tool's low complexity (one optional parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic action and resource but lacks details on behavioral traits, output format, or usage context. Without annotations or output schema, more completeness would be beneficial, but it meets a bare minimum.

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, fully documenting the 'limit' parameter with its type, default, and purpose. The description adds no parameter-specific information beyond what the schema provides. According to the rules, with high schema coverage (>80%), the baseline is 3 even with no param info in the description.

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 with a specific verb ('List') and resource ('Granola documents'), and mentions the scope ('all' with 'basic metadata'). It distinguishes from siblings like 'get_granola_document' (singular) and search tools, but doesn't explicitly contrast them. This is clear but lacks explicit sibling differentiation.

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. It doesn't mention when to prefer this over sibling tools like 'search_granola_notes' or 'search_granola_transcripts' for filtering, nor does it specify prerequisites or exclusions. This leaves usage context entirely implied.

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/btn0s/granola-mcp'

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