Skip to main content
Glama

get_task_checklist

Retrieve checklist items for any task to track subtasks and progress.

Instructions

Get checklist items for a task.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYes

Implementation Reference

  • The handler function for get_task_checklist. Fetches the task by ID via the Habitica API, extracts the checklist, and returns formatted text with completion status for each item.
    get_task_checklist: async ({ taskId }) => {
      const t = (await api("GET", `/tasks/${taskId}`)).data;
      const list = t?.checklist ?? [];
      if (list.length === 0) return ok(`Task "${t.text}" has no checklist items.`);
      return ok(
        `Task: ${t.text}\n` +
          list.map((i) => `${i.completed ? "✓" : "○"} ${i.text} (${i.id})`).join("\n"),
      );
    },
  • The tool definition including name, description, and inputSchema for get_task_checklist. Requires taskId as a string.
    // Checklist
    {
      name: "get_task_checklist",
      description: "Get checklist items for a task.",
      inputSchema: {
        type: "object",
        properties: { taskId: { type: "string" } },
        required: ["taskId"],
      },
    },
  • index.js:475-480 (registration)
    The MCP server setup and registration. Server is created, then ListToolsRequestSchema returns the tools array (which includes get_task_checklist), and CallToolRequestSchema dispatches to the handlers object.
    const server = new Server(
      { name: "habitca-mcp", version: "1.0.0" },
      { capabilities: { tools: {} } },
    );
    
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools }));
  • Helper function `ok` used to format the text response returned by get_task_checklist.
    const ok = (text) => ({ content: [{ type: "text", text }] });
    const json = (obj) => ok(JSON.stringify(obj, null, 2));
  • Helper function `api` used by get_task_checklist to make the GET request to the Habitica API.
    async function api(method, path, body) {
      const url = `${API_BASE}${path}`;
      const headers = {
        "x-api-user": USER_ID,
        "x-api-key": API_TOKEN,
        "x-client": `${USER_ID}-${APP_ID}`,
        "Content-Type": "application/json",
      };
      const res = await fetch(url, {
        method,
        headers,
        body: body === undefined ? undefined : JSON.stringify(body),
      });
      const text = await res.text();
      let payload;
      try {
        payload = text ? JSON.parse(text) : {};
      } catch {
        payload = { raw: text };
      }
      if (!res.ok) {
        const msg = payload?.message || payload?.error || res.statusText;
        throw new McpError(
          ErrorCode.InternalError,
          `Habitica API ${res.status}: ${msg}`,
        );
      }
      return payload;
    }
Behavior2/5

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

No annotations provided, so the description must disclose behavioral traits. It only implies a read operation ('get') but omits details about return format, pagination, ordering, or permissions.

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

Conciseness3/5

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

One sentence, front-loaded with core purpose. However, it is too terse; it could include more detail without sacrificing conciseness.

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 output schema and low parameter coverage, the description is insufficient. It doesn't specify that the result is a list of checklist items or provide any structural hints.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single parameter 'taskId' has no description in the schema (0% coverage). The description adds no extra meaning, leaving the agent to infer its purpose from context alone.

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 states the verb 'get' and resource 'checklist items for a task', making the core purpose clear. However, it doesn't differentiate from siblings like 'get_task' or 'get_tasks', though no direct sibling exists for getting checklist items.

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 (e.g., 'get_task' might include checklist info). No context about prerequisites or when not to use it.

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/leon-jarvis1/habitca_mcp'

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