Skip to main content
Glama

toggl_list_clients

Retrieve client information from your Toggl workspace to manage time tracking projects and organize reporting data.

Instructions

List clients for a workspace

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspace_idNoWorkspace ID (uses default if not provided)

Implementation Reference

  • The primary handler for the 'toggl_list_clients' tool. It resolves the workspace ID, fetches clients using the TogglAPI, and returns a formatted JSON response containing workspace_id, count, and client details (id, name, archived).
    case 'toggl_list_clients': {
      const workspaceId = args?.workspace_id || defaultWorkspaceId;
      if (!workspaceId) {
        throw new Error('Workspace ID required (set TOGGL_DEFAULT_WORKSPACE_ID or provide workspace_id)');
      }
      
      const clients = await api.getClients(workspaceId as number);
      
      return {
        content: [{
          type: 'text',
          text: JSON.stringify({ 
            workspace_id: workspaceId,
            count: clients.length,
            clients: clients.map(c => ({
              id: c.id,
              name: c.name,
              archived: c.archived
            }))
          }, null, 2)
        }]
      };
    }
  • Tool schema definition for 'toggl_list_clients', including name, description, and input schema specifying an optional workspace_id parameter.
    {
      name: 'toggl_list_clients',
      description: 'List clients for a workspace',
      inputSchema: {
        type: 'object',
        properties: {
          workspace_id: {
            type: 'number',
            description: 'Workspace ID (uses default if not provided)'
          }
        }
      },
    },
  • src/index.ts:386-388 (registration)
    Registration of all tools (including toggl_list_clients) via the ListToolsRequestSchema handler, which returns the complete tools array.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
  • Helper method in TogglAPI class that makes the HTTP request to retrieve clients for a specific workspace from the Toggl Track API.
    async getClients(workspaceId: number): Promise<Client[]> {
      return this.request<Client[]>('GET', `/workspaces/${workspaceId}/clients`);
    }
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. It states it's a list operation, implying read-only behavior, but doesn't cover critical aspects like authentication requirements, rate limits, pagination, or error handling. This leaves significant gaps for an agent to understand how to use it safely and effectively.

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 four words, front-loaded with the core action and resource. Every word earns its place with no wasted text, making it easy to parse quickly.

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 lack of annotations and output schema, the description is incomplete. It doesn't explain what the output looks like (e.g., list format, fields returned), authentication needs, or error conditions. For a tool that likely interacts with an external API, this leaves too many unknowns for reliable agent use.

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 description doesn't add any parameter-specific information beyond what's in the schema, which has 100% coverage for the single parameter 'workspace_id'. The schema already describes it as optional with a default, so the baseline score of 3 is appropriate as the description doesn't compensate but also doesn't detract.

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 action ('List') and resource ('clients for a workspace'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'toggl_list_workspaces' or 'toggl_list_projects' beyond specifying the resource type, which prevents 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. It doesn't mention prerequisites (e.g., authentication), when not to use it, or how it compares to other listing tools like 'toggl_list_projects' or 'toggl_list_workspaces' in the sibling set.

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/verygoodplugins/mcp-toggl'

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