Skip to main content
Glama
EoinFalconer

Granola MCP Server

by EoinFalconer

list_workspaces

Retrieve all available workspaces in Granola.ai to organize and access meeting notes, transcripts, and content across projects.

Instructions

List all available workspaces

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/server.ts:259-284 (registration)
    Tool registration for 'list_workspaces' using FastMCP server.addTool(). Includes tool name, description, parameters schema (empty object), and the execute handler function that lists all available workspaces from workspacesCache.
    // Tool: list_workspaces
    server.addTool({
      name: 'list_workspaces',
      description: 'List all available workspaces',
      parameters: z.object({}),
      execute: async () => {
        await ensureDataLoaded();
    
        if (workspacesCache.length === 0) {
          return 'No workspaces found';
        }
    
        const output: string[] = ['# Workspaces\n'];
    
        for (const ws of workspacesCache) {
          output.push(`## ${ws.name || 'Unnamed Workspace'}`);
          output.push(`**ID:** ${ws.id}`);
          if (ws.created_at) {
            output.push(`**Created:** ${formatDate(ws.created_at)}`);
          }
          output.push('');
        }
    
        return output.join('\n');
      }
    });
  • Handler function that executes the list_workspaces tool. Ensures data is loaded, checks if workspacesCache is empty, then formats and returns a markdown list of all workspaces with their ID, name, and creation date.
    execute: async () => {
      await ensureDataLoaded();
    
      if (workspacesCache.length === 0) {
        return 'No workspaces found';
      }
    
      const output: string[] = ['# Workspaces\n'];
    
      for (const ws of workspacesCache) {
        output.push(`## ${ws.name || 'Unnamed Workspace'}`);
        output.push(`**ID:** ${ws.id}`);
        if (ws.created_at) {
          output.push(`**Created:** ${formatDate(ws.created_at)}`);
        }
        output.push('');
      }
    
      return output.join('\n');
    }
  • Workspace interface defining the structure of workspace objects with id, name, created_at, and optional owner_id fields. This is the type used for workspacesCache items.
    export interface Workspace {
      id: string;
      name: string;
      created_at: string;
      owner_id?: string;
    }
  • ensureDataLoaded helper function called by the list_workspaces handler. Checks if cache is empty or stale and triggers loadData() if needed to ensure fresh data.
    async function ensureDataLoaded() {
      const now = Date.now();
      if (documentsCache.size === 0 || (now - lastFetchTime) > CACHE_TTL) {
        await loadData();
      }
    }
  • formatDate helper function used by the list_workspaces handler to format workspace creation dates in a human-readable format with local timezone.
    function formatDate(dateStr: string | null | undefined): string {
      if (!dateStr) return 'Unknown date';
      try {
        const date = new Date(dateStr);
        return date.toLocaleString('en-US', {
          year: 'numeric',
          month: '2-digit',
          day: '2-digit',
          hour: '2-digit',
          minute: '2-digit',
          hour12: false
        });
      } catch {
        return dateStr;
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. 'List all available workspaces' implies a read-only operation but doesn't specify whether it requires authentication, returns paginated results, includes metadata, or has rate limits. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 function without unnecessary words. It's appropriately sized for a simple list operation and front-loads the core purpose immediately.

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 simplicity (0 parameters, no output schema) and lack of annotations, the description is minimally adequate but incomplete. It doesn't address what 'available' means (e.g., accessible to current user vs all in system), the format of returned data, or how it differs from sibling tools. For a tool in a context with multiple filtering alternatives, more contextual information would be helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the absence of inputs. The description doesn't need to compensate for any parameter gaps, and it appropriately doesn't mention parameters. A baseline of 4 is appropriate for zero-parameter tools when the description doesn't introduce confusion.

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 verb ('List') and resource ('all available workspaces'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'filter_by_workspace' or 'list_folders', which would require more specific scope information to earn 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 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. With siblings like 'filter_by_workspace' and 'list_folders' available, there's no indication whether this tool returns unfiltered results, includes nested content, or serves as a broad overview versus more specific queries.

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

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