Skip to main content
Glama

get_comments_list

Retrieve comments from Todoist tasks or projects to track discussions, feedback, and updates. Filter by project or task to access relevant conversations.

Instructions

Get comments list from Todoist

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoFilter by project
task_idNoFilter by task

Implementation Reference

  • Registration of the 'get_comments_list' tool using createApiHandler, specifying name, description, input schema, HTTP GET method, and Todoist API path '/comments'.
    createApiHandler({
        name: 'get_comments_list',
        description: 'Get comments list from Todoist',
        schemaShape: {
            project_id: z.string().optional().describe('Filter by project'),
            task_id: z.string().optional().describe('Filter by task'),
        },
        method: 'GET',
        path: '/comments',
    });
  • Zod input schema definition for optional project_id and task_id parameters used to filter the comments list.
    schemaShape: {
        project_id: z.string().optional().describe('Filter by project'),
        task_id: z.string().optional().describe('Filter by task'),
    },
  • The core handler function generated by createApiHandler that executes the tool logic: constructs the API path, validates parameters, performs todoistApi.get('/comments', {project_id?, task_id?}) for get_comments_list, 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;
    };
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. It states 'Get comments list' which implies a read-only operation, but doesn't disclose behavioral traits like authentication needs, rate limits, pagination, or what happens if no filters are applied (e.g., returns all comments). This leaves gaps for safe agent invocation.

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—'Get comments list from Todoist' is front-loaded and appropriately sized for a simple tool. Every word earns its place without redundancy.

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 read operation with filtering parameters, the description is incomplete. It lacks details on return format (e.g., list structure, fields), error handling, or prerequisites (e.g., authentication). For a tool with 2 parameters and behavioral uncertainty, this is inadequate.

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?

Schema description coverage is 100%, with clear descriptions for 'project_id' and 'task_id' as filters. The description adds no parameter semantics beyond the schema, but since coverage is high, the baseline is 3. It doesn't explain how filters interact (e.g., combined or exclusive) or default behaviors.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get comments list from Todoist' clearly states the action (get) and resource (comments list), but it's vague about scope and doesn't distinguish from sibling tools like 'get_comments' (singular vs. list). It specifies the source (Todoist) but lacks detail on what 'list' entails (e.g., all comments, filtered).

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 on when to use this tool versus alternatives like 'get_comments' (singular) or other filtering tools. The description implies it retrieves comments, but doesn't specify contexts (e.g., for reporting, review) or exclusions (e.g., not for editing).

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