Skip to main content
Glama

score_task

Score tasks in Habitica by using direction 'up' to complete a to-do, daily, or positive habit, and 'down' to record a negative habit.

Instructions

Score a task. direction='up' completes a todo/daily or marks a + habit; 'down' is for negative habits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYes
directionNoup

Implementation Reference

  • Input schema definition for score_task tool: requires taskId (string) and optional direction ('up' or 'down', default 'up').
    {
      name: "score_task",
      description: "Score a task. direction='up' completes a todo/daily or marks a + habit; 'down' is for negative habits.",
      inputSchema: {
        type: "object",
        properties: {
          taskId: { type: "string" },
          direction: { type: "string", enum: ["up", "down"], default: "up" },
        },
        required: ["taskId"],
      },
    },
  • Handler implementation: calls Habitica API POST /tasks/{taskId}/score/{direction}, then formats response with exp delta, gp, and level if present.
    score_task: async ({ taskId, direction = "up" }) => {
      const r = (await api("POST", `/tasks/${taskId}/score/${direction}`)).data;
      const parts = [`Scored task ${direction}.`];
      if (r?.exp != null) parts.push(`exp Δ ${r.delta?.toFixed?.(2) ?? ""} → ${r.exp}`);
      if (r?.gp != null) parts.push(`gp ${r.gp.toFixed(2)}`);
      if (r?.lvl != null) parts.push(`level ${r.lvl}`);
      return ok(parts.join(" · "));
    },
  • index.js:482-492 (registration)
    Generic tool call dispatcher that looks up handlers[name]; score_task is registered via this mechanism (handlers object includes score_task key).
    server.setRequestHandler(CallToolRequestSchema, async (req) => {
      const { name, arguments: args = {} } = req.params;
      const fn = handlers[name];
      if (!fn) throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
      try {
        return await fn(args);
      } catch (err) {
        if (err instanceof McpError) throw err;
        throw new McpError(ErrorCode.InternalError, err?.message ?? String(err));
      }
    });
  • Helper function 'ok' used by score_task handler to wrap the result text in MCP content response format.
    const ok = (text) => ({ content: [{ type: "text", text }] });
  • Helper function 'api' used by score_task handler to make HTTP requests 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",
      };
Behavior2/5

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

No annotations are provided, so the description must carry full burden. It states the outcome of 'up' and 'down' directions but does not disclose side effects, required permissions, or behavior on invalid input. The description adds some insight beyond schema but lacks completeness for safe 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 concise sentence followed by a clarifying clause. It is front-loaded with 'Score a task' and every word adds value. No redundancy or verbosity.

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?

For a simple tool with two parameters and no output schema, the description explains direction behavior but omits details about the return value or side effects. It is adequate for basic usage but not fully comprehensive given the lack of annotations.

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 0%, so description must compensate. It explains the direction parameter semantics (up vs down) but does not describe taskId beyond its existence. This adds moderate value for direction but insufficient for the required parameter.

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?

The description clearly states 'Score a task' and explains the effect of direction values: 'up' completes a todo/daily or marks a + habit, 'down' is for negative habits. This provides specific verb and resource, distinguishing it from sibling tools like score_checklist_item or update_task.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains what direction does but offers no guidance on when to use this tool vs alternatives (e.g., score_checklist_item) or conditions for use. It implicitly suggests this is for tasks, but explicit when/when-not is missing.

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