Skip to main content
Glama

getTasksByTaskListId

Retrieve all tasks from a specific task list in Teamwork projects, with options for pagination and including completed items.

Instructions

Get all tasks from a specific task list in Teamwork

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tasklistIdYesThe ID of the task list to get tasks from
pageNoPage number for pagination
pageSizeNoNumber of items per page
includeCompletedTasksNoInclude completed tasks in the results

Implementation Reference

  • The handler function that executes the tool: fetches tasks from the specified tasklist ID via API, supports pagination and filters, returns JSON response or error.
    export async function handleGetTasksByTaskListId(input: any) {
      try {
        const { tasklistId, page, pageSize, includeCompletedTasks, ...otherParams } = input;
        
        logger.info(`Getting tasks for task list ID: ${tasklistId}`);
        
        // Build query parameters
        const queryParams: Record<string, any> = {
          page,
          pageSize,
          includeCompletedTasks,
          ...otherParams
        };
        
        // Filter out undefined values
        Object.keys(queryParams).forEach(key => 
          queryParams[key] === undefined && delete queryParams[key]
        );
        
        // Make API call
        const apiClient = getApiClientForVersion();
        const response = await apiClient.get(
          `/tasklists/${tasklistId}/tasks.json`, 
          { params: queryParams }
        );
        
        return {
          content: [{
            type: "text",
            text: JSON.stringify(response.data, null, 2)
          }]
        };
      } catch (error: any) {
        return createErrorResponse(error, 'Retrieving tasks by task list');
      }
    } 
  • Tool definition object containing the name, description, input schema (with tasklistId required, optional pagination and filters), and annotations.
    export const getTasksByTaskListIdDefinition = {
      name: "getTasksByTaskListId",
      description: "Get all tasks from a specific task list in Teamwork",
      inputSchema: {
        type: "object",
        properties: {
          tasklistId: {
            type: "integer",
            description: "The ID of the task list to get tasks from"
          },
          page: {
            type: "integer",
            description: "Page number for pagination"
          },
          pageSize: {
            type: "integer",
            description: "Number of items per page"
          },
          includeCompletedTasks: {
            type: "boolean",
            description: "Include completed tasks in the results"
          }
        },
        required: ["tasklistId"]
      },
      annotations: {
        title: "Get Tasks by Task List ID",
        readOnlyHint: false,
        destructiveHint: false,
        openWorldHint: false
      }
    };
  • Registers the tool in the toolPairs array, mapping definition to handler for inclusion in toolDefinitions and toolHandlersMap.
    { definition: getTasksByTaskListId, handler: handleGetTasksByTaskListId },
Behavior3/5

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

Annotations indicate readOnlyHint=false, destructiveHint=false, and openWorldHint=false, covering safety and scope. The description adds no behavioral context beyond this, such as rate limits, authentication needs, or pagination behavior. Since annotations provide basic coverage, the description meets minimum expectations without contradiction.

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 unnecessary details. It's front-loaded and wastes no words, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of an output schema and annotations covering only basic hints, the description is minimally adequate. It doesn't explain return values or error conditions, but for a simple read operation with good schema coverage, it provides enough context for basic use without being comprehensive.

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 parameter descriptions in the input schema. The description adds no additional parameter semantics beyond implying task list filtering, which is already covered by the schema. This meets the baseline for high schema coverage.

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 'tasks from a specific task list in Teamwork', making the purpose evident. However, it doesn't explicitly differentiate from sibling tools like 'getTasks' or 'getTasksByProjectId', which would require mentioning the specific task list scope as a key distinction.

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 sibling tools like 'getTasks' (general tasks) or 'getTasksByProjectId' (tasks by project), leaving the agent to infer usage context from the tool name alone.

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/Vizioz/Teamwork-MCP'

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