Skip to main content
Glama

listProjects

Retrieve all projects for the authenticated user from the Clockify MCP server to manage and organize time tracking activities.

Instructions

List all projects for the authenticated user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The switch case in callToolHandler that implements the 'listProjects' tool. It fetches the list of projects from the user's active workspace using the clockifyFetch helper and returns them as JSON text.
    case "listProjects": {
      const projects = await clockifyFetch(
        `/workspaces/${workspaceId}/projects`,
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(projects, null, 2),
          },
        ],
      };
    }
  • The tool definition in listToolsHandler, including name, description, and empty input schema (no parameters required).
    {
      name: "listProjects",
      description: "List all projects for the authenticated user.",
      inputSchema: { type: "object", properties: {}, required: [] },
    },
  • src/index.ts:43-43 (registration)
    Registers the listToolsHandler on the MCP server, which exposes the 'listProjects' tool schema to clients.
    server.setRequestHandler(ListToolsRequestSchema, listToolsHandler);
  • src/index.ts:49-49 (registration)
    Registers the callToolHandler on the MCP server, which handles execution of the 'listProjects' tool via its switch case.
    server.setRequestHandler(CallToolRequestSchema, callToolHandler);
  • Helper function to make authenticated API calls to Clockify, used by the listProjects handler.
    async function clockifyFetch(endpoint: string, options: RequestInit = {}) {
      const apiKey = getApiKey();
      const baseUrl = "https://api.clockify.me/api/v1";
      const url = endpoint.startsWith("http") ? endpoint : `${baseUrl}${endpoint}`;
      const headers = {
        "X-Api-Key": apiKey,
        "Content-Type": "application/json",
        ...(options.headers || {}),
      };
      const response = await fetch(url, { ...options, headers });
    
      if (!response.ok) {
        const text = await response.text();
        console.error(
          `[Error] Clockify API ${url} failed: ${response.status} ${text}`,
        );
        throw new Error(`Clockify API error: ${response.status} ${text}`);
      }
      return response.json();
    }
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. It implies a read-only operation ('List') but doesn't disclose behavioral traits such as pagination, sorting, rate limits, error conditions, or what 'authenticated user' entails. This is a significant gap for a tool with zero annotation coverage.

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 front-loads the core action ('List all projects') and adds essential scope ('for the authenticated user'). There is zero waste, making it appropriately sized and well-structured.

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 no annotations, no output schema, and a simple tool with 0 parameters, the description is incomplete. It lacks details on return format (e.g., list structure, fields), error handling, or authentication requirements, which are crucial for an agent to use it correctly.

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 no parameter information is needed. The description appropriately doesn't add param details, earning a baseline score of 4 for not overloading with unnecessary information.

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 ('projects'), specifying scope ('all projects for the authenticated user'). It distinguishes from siblings like 'getTimeEntries' or 'listUsers' by focusing on projects, but doesn't explicitly differentiate from potential similar tools like 'getProjects'.

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., authentication), exclusions, or compare to siblings like 'getSummaryReport' or 'addTimeEntry' for project-related tasks.

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/inakianduaga/clockify-mcp'

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