Skip to main content
Glama

tasks_summary

Retrieve task status counts and identify work-in-progress tasks from the MCP Tasks server for efficient project tracking and management.

Instructions

Get per-status task counts and the WIP task(s). Redundant right after tasks_add/tasks_update

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
source_idNoSource ID from task_setup() response - Defaults to most recent in the workspace if not provided - Try to always provide it! - If you don't have it, ask the user for a file path and call task_setup()

Implementation Reference

  • The core function that executes the logic of the tasks_summary tool. It loads metadata, computes task counts per status, total tasks, WIP tasks, and returns a JSON string summary.
    function getSummary(sourceId?: string, extra?: object) { const meta = metadata.load(sourceId) const counts = _.mapValues(meta.groups, tasks => tasks.length) const total = Object.values(counts).reduce((sum, count) => sum + count, 0) const wip = _.camelCase(env.STATUS_WIP) return JSON.stringify({ source: _.omit(meta.source, ['workspace']), ...counts, total, ...extra, instructions: env.INSTRUCTIONS || undefined, reminders: env.STATUS_REMINDERS ? meta.groups[env.STATUS_REMINDERS] : undefined, [wip]: meta.groups[env.STATUS_WIP], }) }
  • Zod schema for the tool input: requires source_id.
    schema: z.object({ source_id: schemas.sourceId, }),
  • src/tools.ts:153-163 (registration)
    Tool definition for 'summary', renamed to 'tasks_summary' via defineTool prefix logic if enabled.
    summary: defineTool('summary', { schema: z.object({ source_id: schemas.sourceId, }), fromArgs: () => ({}), description: 'Get per-status task counts and the WIP task(s). Redundant right after tasks_add/tasks_update', isReadOnly: true, handler: (args) => { return getSummary(args.source_id) }, }),
  • src/server.ts:15-42 (registration)
    Registers all tools (including tasks_summary) with the FastMCP server using server.addTool.
    // Register all tools & resources for (const tool of Object.values(tools)) { if (!tool.isEnabled) { continue } if (tool.isResource) { // Register as resource server.addResource({ uri: `resource://${tool.name}`, name: tool.description, mimeType: 'text/plain', load: () => cli.runTool(tool, []).then(text => ({ text })), }) } else { // Register as tool with enhanced logging server.addTool({ annotations: { openWorldHint: false, // This tool doesn't interact with external systems readOnlyHint: tool.isReadOnly, title: tool.name, }, name: tool.name, description: tool.description, parameters: tool.schema, execute: (args) => cli.runTool(tool, args), }) } }
  • Helper function to define tools, applies 'tasks_' prefix to the name if env.PREFIX_TOOLS is true, enabling the 'tasks_summary' name.
    function defineTool<S extends ZodSchema>(name: string, tool: { schema: S description: string isResource?: boolean isReadOnly?: boolean isEnabled?: boolean handler: (args: z.infer<S>, context?: any) => any fromArgs: (args: string[]) => z.infer<S> }) { const toolName = env.PREFIX_TOOLS ? `tasks_${name}` : name return { ...tool, name: toolName, isResource: tool.isResource ?? false, isReadOnly: tool.isReadOnly ?? false, isEnabled: tool.isEnabled ?? true, } }

Other Tools

Related 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/flesler/mcp-tasks'

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