Skip to main content
Glama

toggl_list_projects

Retrieve all project names and details from your Toggl workspace to organize time tracking data and manage tasks efficiently.

Instructions

List projects for a workspace

Input Schema

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

Implementation Reference

  • MCP tool handler for 'toggl_list_projects': extracts workspace_id from arguments (falling back to env default), calls TogglAPI.getProjects, formats response with project details (id, name, active, billable, color, client_id), and returns as JSON text content.
    case 'toggl_list_projects': {
      const workspaceId = args?.workspace_id || defaultWorkspaceId;
      if (!workspaceId) {
        throw new Error('Workspace ID required (set TOGGL_DEFAULT_WORKSPACE_ID or provide workspace_id)');
      }
      
      const projects = await api.getProjects(workspaceId as number);
      
      return {
        content: [{
          type: 'text',
          text: JSON.stringify({ 
            workspace_id: workspaceId,
            count: projects.length,
            projects: projects.map(p => ({
              id: p.id,
              name: p.name,
              active: p.active,
              billable: p.billable,
              color: p.color,
              client_id: p.client_id
            }))
          }, null, 2)
        }]
      };
    }
  • Tool schema definition: name, description, and input schema accepting optional workspace_id (number).
    {
      name: 'toggl_list_projects',
      description: 'List projects for a workspace',
      inputSchema: {
        type: 'object',
        properties: {
          workspace_id: {
            type: 'number',
            description: 'Workspace ID (uses default if not provided)'
          }
        }
      },
    },
  • TogglAPI.getProjects: Makes authenticated GET request to Toggl API endpoint /workspaces/{workspaceId}/projects to fetch list of projects.
    async getProjects(workspaceId: number): Promise<Project[]> {
      return this.request<Project[]>('GET', `/workspaces/${workspaceId}/projects`);
    }
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 a read operation ('List'), implying it's likely safe and non-destructive, but doesn't specify permissions, rate limits, pagination, or return format. This leaves significant gaps for a tool that interacts with external data.

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 any fluff or redundancy. It is appropriately sized and front-loaded, 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 cover behavioral aspects like authentication needs, response structure, or error handling. For a data retrieval tool in a multi-tool server, more context is needed to ensure reliable 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 schema description coverage is 100%, with the single parameter 'workspace_id' fully documented in the schema. The description adds no additional parameter details beyond implying workspace context, so it meets the baseline of 3 where the schema handles the heavy lifting.

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 ('projects for a workspace'), making the purpose immediately understandable. It distinguishes from siblings like 'toggl_list_clients' or 'toggl_list_workspaces' by specifying 'projects'. However, it doesn't specify the scope (e.g., all projects vs. filtered), 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 like 'toggl_project_summary' or 'toggl_workspace_summary'. It mentions a workspace context but doesn't clarify prerequisites, exclusions, or comparative use cases with sibling tools.

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