Skip to main content
Glama

backlog_get

Retrieve detailed information about backlog items using task IDs or resource URIs, supporting single or batch queries for any status.

Instructions

Get full details by ID. Accepts task IDs (TASK-0001, EPIC-0002) or MCP resource URIs (mcp://backlog/resources/design.md). Works for any item regardless of status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTask ID (e.g. TASK-0001) or MCP resource URI (e.g. mcp://backlog/resources/file.md). Array for batch fetch.

Implementation Reference

  • The main implementation of backlog_get tool. Includes the fetchItem helper function (lines 20-33) that retrieves either tasks by ID or resources by MCP URI, and the registerBacklogGetTool function (lines 35-53) that registers the tool with the MCP server and handles the async execution logic with support for batch fetching multiple IDs.
    function fetchItem(id: string): string {
      if (isResourceUri(id)) {
        const resource = storage.getResource(id);
        if (!resource) return `Not found: ${id}`;
        // Return resource with metadata header for agent context
        const header = `# Resource: ${id}\nMIME: ${resource.mimeType}`;
        const frontmatterStr = resource.frontmatter
          ? `\nFrontmatter: ${JSON.stringify(resource.frontmatter)}`
          : '';
        return `${header}${frontmatterStr}\n\n${resource.content}`;
      }
    
      return storage.getMarkdown(id) || `Not found: ${id}`;
    }
    
    export function registerBacklogGetTool(server: McpServer) {
      server.registerTool(
        'backlog_get',
        {
          description: 'Get full details by ID. Accepts task IDs (TASK-0001, EPIC-0002) or MCP resource URIs (mcp://backlog/resources/design.md). Works for any item regardless of status.',
          inputSchema: z.object({
            id: z.union([z.string(), z.array(z.string())]).describe('Task ID (e.g. TASK-0001) or MCP resource URI (e.g. mcp://backlog/resources/file.md). Array for batch fetch.'),
          }),
        },
        async ({ id }) => {
          const ids = Array.isArray(id) ? id : [id];
          if (ids.length === 0) {
            return { content: [{ type: 'text', text: 'Required: id' }], isError: true };
          }
          const results = ids.map(fetchItem);
          return { content: [{ type: 'text', text: results.join('\n\n---\n\n') }] };
        }
      );
    }
  • Zod schema definition for the backlog_get tool input. Accepts either a single string (task ID like TASK-0001 or MCP resource URI like mcp://backlog/resources/file.md) or an array of strings for batch fetching. Includes description explaining the tool's purpose.
    {
      description: 'Get full details by ID. Accepts task IDs (TASK-0001, EPIC-0002) or MCP resource URIs (mcp://backlog/resources/design.md). Works for any item regardless of status.',
      inputSchema: z.object({
        id: z.union([z.string(), z.array(z.string())]).describe('Task ID (e.g. TASK-0001) or MCP resource URI (e.g. mcp://backlog/resources/file.md). Array for batch fetch.'),
      }),
    },
  • Registration of the backlog_get tool in the main tools index. Imports registerBacklogGetTool from backlog-get.js and calls it within registerTools function to register the tool with the MCP server.
    import { registerBacklogGetTool } from './backlog-get.js';
    import { registerBacklogCreateTool } from './backlog-create.js';
    import { registerBacklogUpdateTool } from './backlog-update.js';
    import { registerBacklogDeleteTool } from './backlog-delete.js';
    import { registerBacklogSearchTool } from './backlog-search.js';
    import { registerBacklogContextTool } from './backlog-context.js';
    
    export function registerTools(server: McpServer) {
      registerBacklogListTool(server);
      registerBacklogGetTool(server);
  • Storage helper method getMarkdown that retrieves markdown content for tasks by ID. Used by the backlog_get handler to fetch task details.
    getMarkdown(id: string): string | null {
      return this.taskStorage.getMarkdown(id);
    }
  • Storage helper method getResource that retrieves resources by MCP URI. Used by the backlog_get handler to fetch resource content with metadata (content, frontmatter, mimeType). Part of ADR-0073 implementation for unified resource access.
    getResource(uri: string): { content: string; frontmatter?: Record<string, any>; mimeType: string } | undefined {
      try {
        return resourceManager.read(uri);
      } catch {
        return undefined;
      }
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that it works for items 'regardless of status' and handles batch fetching via arrays, which are useful behavioral traits. However, it doesn't mention potential errors (e.g., invalid IDs), response format, or performance aspects like rate limits, leaving gaps in transparency for a read operation.

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 front-loaded with the core purpose ('Get full details by ID'), followed by essential details in two concise sentences. Every sentence adds value: the first specifies input formats, and the second clarifies scope. There's no redundancy or fluff, making it highly efficient.

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 1 parameter with full schema coverage and no output schema, the description is moderately complete. It covers input semantics and scope well, but as a read tool with no annotations, it lacks details on return values (e.g., what 'full details' includes) and error handling. This is adequate but has clear gaps for agent invocation.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds value by explaining the semantics of the 'id' parameter: it clarifies acceptable formats (task IDs like 'TASK-0001' and MCP resource URIs) and that it works for batch fetch with arrays. This goes beyond the schema's generic description, earning a higher score.

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 full details') and resource ('by ID'), making the purpose evident. It distinguishes from siblings like 'backlog_list' (which lists items) and 'backlog_search' (which searches by criteria), but doesn't explicitly name these alternatives. The mention of 'full details' adds specificity beyond a simple fetch.

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 implies usage by stating it works for 'any item regardless of status' and accepts specific ID formats, suggesting it's for retrieving known items. However, it doesn't explicitly say when to use this vs. alternatives like 'backlog_list' for browsing or 'backlog_search' for filtering. The context is clear but lacks explicit guidance on tool selection.

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/gkoreli/backlog-mcp'

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