Skip to main content
Glama
rwese
by rwese

ticket-read

List and filter tickets for a given backlog topic. Filter by status or batch to view specific subsets of work items.

Instructions

Read-only access to backlog tickets - list and filter tickets for a backlog item

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYesTopic name (required)
statusNoFilter by status
batchNoFilter by batch

Implementation Reference

  • Primary tool handler for 'ticket-read'. Uses the @opencode-ai/plugin 'tool()' builder. Takes 'topic' (required), 'status' (optional enum), and 'batch' (optional) arguments. Calls 'listTodos' to fetch and filter todos, then formats output as a Markdown table. Returns a message if no todos found.
    import { tool } from "@opencode-ai/plugin";
    import { listTodos } from "../lib/backlog-ticket-shared";
    import { format } from "../lib/markdown-formatter";
    
    export default tool({
      description: "Read-only access to backlog todos - list and filter todos for a backlog item",
      args: {
        topic: tool.schema
          .string()
          .describe("Backlog topic to read todos from"),
        status: tool.schema
          .enum(["pending", "in_progress", "completed", "cancelled"])
          .optional()
          .describe("Filter todos by status"),
        batch: tool.schema
          .string()
          .optional()
          .describe("Filter todos by batch identifier"),
      },
    
      async execute(args, context) {
        const { topic, status, batch } = args;
        
        // Call listTodos with filters
        const todos = listTodos(topic, { status, batch });
        
        if (todos.length === 0) {
          return `No todos found for backlog: ${topic}`;
        }
    
        return format(todos, {
          columns: [
            { key: 'id' },
            { key: 'content' },
            { key: 'status' },
            { key: 'batch' },
            { key: 'dependencies' }
          ],
          forceTable: true
        });
      }
    });
  • Fallback handler function 'handleBacklogTodoRead' used in the MCP server's switch-case dispatch. Parses args, calls 'listTodos' with filters, and returns JSON-stringified results.
    async function handleBacklogTodoRead(args: any) {
      const { topic, status, batch } = args;
      if (!topic) throw new Error("topic is required");
    
      const filters: any = {};
      if (status) filters.status = status;
      if (batch) filters.batch = batch;
    
      const todos = listTodos(topic, filters);
      return JSON.stringify(todos, null, 2);
    }
  • Schema/registration of 'ticket-read' as an MCP tool definition. Defines 'inputSchema' with 'topic' (required string), 'status' (optional enum), and 'batch' (optional string properties.
    {
      name: "ticket-read",
      description: "Read-only access to backlog tickets - list and filter tickets for a backlog item",
      inputSchema: {
        type: "object",
        properties: {
          topic: {
            type: "string",
            description: "Topic name (required)",
          },
          status: {
            type: "string",
            enum: ["pending", "in_progress", "completed", "cancelled"],
            description: "Filter by status",
          },
          batch: {
            type: "string",
            description: "Filter by batch",
          },
        },
        required: ["topic"],
      },
  • src/index.ts:1014-1016 (registration)
    Switch-case routing in the MCP request handler. Maps tool name 'ticket-read' to call 'handleBacklogTodoRead'.
    case "ticket-read":
      result = await handleBacklogTodoRead(request.params.arguments);
      break;
  • Helper function 'listTodos' shared across ticket tools. Reads todos from storage for a given topic, then optionally filters by status and/or batch.
    export function listTodos(topic: string, filters?: { status?: string, batch?: string }): Todo[] {
      const data = readTodos(topic);
      let todos = data.todos;
    
      if (filters?.status) {
        todos = todos.filter(t => t.status === filters.status);
      }
    
      if (filters?.batch) {
        todos = todos.filter(t => t.batch === filters.batch);
      }
    
      return todos;
    }
Behavior2/5

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

The description mentions 'read-only', indicating no side effects, but lacks details on behavioral traits such as pagination, ordering, rate limits, or authentication requirements. Since no annotations are present, the description carries the full burden but falls short.

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 exceptionally concise, using a single sentence of about 10 words. It is front-loaded with the key qualifier 'Read-only access' and every word adds value without redundancy.

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 list/filter tool with no output schema, the description does not explain the return format or structure. However, it covers the core functionality. Given the low complexity (3 parameters), it is minimally adequate.

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?

All three parameters have descriptions in the input schema (100% coverage), and the description adds no additional meaning beyond 'list and filter'. Baseline 3 is appropriate as the schema already documents the parameters sufficiently.

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 identifies the tool as providing read-only access to backlog tickets with list and filter capabilities. It specifies the resource (backlog tickets) and action (list and filter), and distinguishes from sibling tools like ticket-write.

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 for viewing tickets by stating 'Read-only access', but does not explicitly state when to use this tool over alternatives like 'read' or 'ticket-done'. No exclusions or alternative recommendations are provided.

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

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