Skip to main content
Glama

getTasksByTaskListId

Retrieve all tasks from a specified task list in Teamwork. Supports pagination and includes completed tasks.

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 logic. It makes a GET request to /tasklists/{tasklistId}/tasks.json with optional pagination and filter parameters, then returns the response data as text.
    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');
      }
    } 
  • The tool definition and input schema. Defines the tool name as 'getTasksByTaskListId', description, and input properties (tasklistId required, optional page, pageSize, includeCompletedTasks).
    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
      }
    };
  • Registration of the tool in the toolPairs array, pairing the definition with its handler.
    { definition: getTasksByTaskListId, handler: handleGetTasksByTaskListId },
  • Import of the getTasksByTaskListId definition and handler into the tools index.
    import { getTasksByTaskListIdDefinition as getTasksByTaskListId, handleGetTasksByTaskListId } from './tasks/getTasksByTaskListId.js';
  • Re-export of the handler from the tools index for downstream consumers.
    export { handleGetTasksByTaskListId } from './tasks/getTasksByTaskListId.js';
Behavior1/5

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

Description implies a read operation ('Get all tasks'), but annotations set readOnlyHint=false, indicating possible side effects. This contradiction undermines transparency. No additional behavioral details are provided.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence is concise and front-loaded with purpose. Could benefit from slight restructuring to include usage hints, but no wasted words.

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?

Lacks details on pagination, result set limits, or behavior of optional parameters like includeCompletedTasks. With no output schema, the description should provide more operational context.

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 coverage is 100%, so the baseline is 3. Description adds no extra meaning beyond the parameter descriptions already in the schema, e.g., does not clarify pagination or default behavior of includeCompletedTasks.

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

Purpose5/5

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

Description clearly states verb 'Get', resource 'tasks', and specifier 'from a specific task list'. It unambiguously differentiates from siblings like getTasksByProjectId or getTasks.

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 such as getTasks or getTasksByProjectId. Agent cannot determine context for choosing this tool over siblings.

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