Skip to main content
Glama

get_collaborators

Retrieve all collaborators for a Todoist project by providing the project ID to manage team access and permissions.

Instructions

Get all collaborators for a project in Todoist

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • Registers the get_collaborators tool with MCP server via createApiHandler factory, defining its name, description, input schema (project id), HTTP method, and Todoist API endpoint path.
    createApiHandler({
        name: 'get_collaborators',
        description: 'Get all collaborators for a project in Todoist',
        schemaShape: {
            id: z.string(),
        },
        method: 'GET',
        path: '/projects/{id}/collaborators',
    });
  • Input schema for get_collaborators tool: requires a string 'id' parameter for the project.
        id: z.string(),
    },
  • Handler function executed for get_collaborators: parses path template '/projects/{id}/collaborators', validates and encodes the 'id' parameter, calls todoistApi.get on the constructed path with any additional params, and returns the result.
    const handler = async (args: z.infer<z.ZodObject<T>>): Promise<R> => {
        let finalPath = options.path;
        const pathParams: Record<string, string> = {};
    
        // Extract path parameters (e.g., {id}) and replace them with actual values
        const pathParamRegex = /{([^}]+)}/g;
        let match;
    
        while ((match = pathParamRegex.exec(options.path)) !== null) {
            const fullMatch = match[0]; // e.g., "{id}"
            const paramName = match[1]; // e.g., "id"
    
            if (args[paramName] === undefined) {
                throw new Error(`Path parameter ${paramName} is required but not provided`);
            }
    
            // Validate and encode path parameter using the centralized security function
            const safeParamValue = validatePathParameter(args[paramName], paramName);
            finalPath = finalPath.replace(fullMatch, safeParamValue);
            pathParams[paramName] = String(args[paramName]);
        }
    
        // Collect non-path parameters for query string or request body
        const otherParams = Object.entries(args).reduce(
            (acc, [key, value]) => {
                if (value !== undefined && !pathParams[key]) {
                    acc[key] = value;
                }
                return acc;
            },
            {} as Record<string, any>
        );
    
        // Apply custom parameter transformation if provided
        const finalParams = options.transformParams ? options.transformParams(args) : otherParams;
    
        // Execute the API request based on HTTP method
        let result;
        switch (options.method) {
            case 'GET':
                result = await todoistApi.get(finalPath, finalParams);
                break;
            case 'POST':
                log('POST', finalPath, finalParams);
                result = await todoistApi.post(finalPath, finalParams);
                break;
            case 'DELETE':
                result = await todoistApi.delete(finalPath);
                break;
        }
    
        // Apply result post-processing if provided
        return options.processResult ? options.processResult(result, args) : result;
    };
  • Final MCP tool registration via server.tool callback, which wraps the handler in error handling and JSON response formatting.
        server.tool(name, description, paramsSchema, mcpToolCallback as unknown as ToolCallback<T>);
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Get all collaborators') but lacks details on permissions required, rate limits, pagination, error handling, or output format. This is inadequate for a tool with zero annotation coverage, as it leaves critical behavioral traits unspecified.

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 with zero waste. It is front-loaded with the core purpose and appropriately sized for the tool's complexity, 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, no output schema, and incomplete parameter documentation (0% coverage), the description is insufficient. It states what the tool does but omits critical context such as return values, error conditions, and behavioral constraints, making it incomplete for effective 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 does not mention the 'id' parameter at all, and with 0% schema description coverage, the parameter is undocumented in both the schema and description. However, since there is only one parameter, the baseline is 4, but the description fails to add any semantic value (e.g., explaining that 'id' refers to a project ID), so it is penalized to a score of 3 for not compensating for the coverage gap.

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 ('Get') and resource ('all collaborators for a project in Todoist'), making the purpose unambiguous. However, it does not explicitly differentiate from sibling tools like 'get_projects' or 'get_tasks', which target different resources but share the 'get' pattern, so it falls short of 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 does not mention prerequisites (e.g., needing a valid project ID), exclusions, or comparisons to sibling tools like 'get_projects_list' or 'get_tasks_list' for related data, leaving usage context implied at best.

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/stanislavlysenko0912/todoist-mcp-server'

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