Skip to main content
Glama

project_list

Read-onlyIdempotent

List and filter projects with epic/task counts and completion percentages to track progress in a structured database.

Instructions

List all projects with epic/task counts and completion percentages. Optionally filter by status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoFilter by status

Implementation Reference

  • Handler function for the project_list tool.
    function handleProjectList(args: Record<string, unknown>) {
      const db = getDb();
      const status = args.status as string | undefined;
    
      let sql = `
        SELECT p.*,
          COUNT(DISTINCT e.id) as epic_count,
          COUNT(DISTINCT t.id) as task_count,
          SUM(CASE WHEN t.status = 'done' THEN 1 ELSE 0 END) as done_count,
          CASE WHEN COUNT(DISTINCT t.id) > 0
            THEN ROUND(SUM(CASE WHEN t.status = 'done' THEN 1 ELSE 0 END) * 100.0 / COUNT(DISTINCT t.id), 1)
            ELSE 0 END as completion_pct
        FROM projects p
        LEFT JOIN epics e ON e.project_id = p.id
        LEFT JOIN tasks t ON t.epic_id = e.id
      `;
    
      const params: unknown[] = [];
      if (status) {
        sql += ' WHERE p.status = ?';
        params.push(status);
      }
    
      sql += ' GROUP BY p.id ORDER BY p.created_at DESC';
    
      return db.prepare(sql).all(...params);
    }
  • Definition and input schema for the project_list tool.
    {
      name: 'project_list',
      description:
        'List all projects with epic/task counts and completion percentages. Optionally filter by status.',
      annotations: { title: 'List Projects', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
      inputSchema: {
        type: 'object',
        properties: {
          status: {
            type: 'string',
            enum: ['active', 'on_hold', 'completed', 'archived'],
            description: 'Filter by status',
          },
        },
      },
    },
  • Registration of the project_list handler.
    export const handlers: Record<string, ToolHandler> = {
      project_create: handleProjectCreate,
      project_list: handleProjectList,
Behavior3/5

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

Annotations already provide readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=false. The description adds useful context about what data is returned (counts and percentages) and the filtering capability, but doesn't disclose behavioral traits like pagination, rate limits, or authentication requirements beyond what annotations cover.

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?

Two sentences with zero waste. First sentence states core functionality with specific data points, second sentence adds the optional filtering capability. Perfectly front-loaded and appropriately sized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only listing tool with good annotations and a simple parameter schema, the description is mostly complete. However, without an output schema, it could benefit from more detail about the return format (structure of the list items, what fields are included beyond counts/percentages). The description covers the essentials but leaves some questions about the response format.

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 100% with the single parameter 'status' fully documented in the schema. The description mentions 'optionally filter by status' which aligns with but doesn't add meaning beyond what the schema already provides. Baseline 3 is appropriate when schema does the heavy lifting.

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 the verb ('List') and resource ('projects') with specific details about what information is included ('epic/task counts and completion percentages'). It distinguishes from siblings like 'project_create' or 'project_update' by being a read-only listing operation.

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

Usage Guidelines4/5

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

The description provides clear context for usage with the optional status filter, but doesn't explicitly state when to use this tool versus alternatives like 'tracker_search' or 'tracker_dashboard' which might also provide project information. The guidance is good but lacks sibling differentiation.

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/spranab/saga-mcp'

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