Skip to main content
Glama
soil-dev

capsulemcp

show_track

Retrieve a track instance by its ID, including description, date, direction, and associated tasks. Use this to view track details without entity or completion information.

Instructions

Fetch a single track instance by id. Returns the minimal Capsule projection: id, description, trackDateOn, direction, and the array of tasks attached to the track. Capsule's GET /tracks/{id} does NOT include a trackDefinition link, an entity reference, or a completion field — to find the entity a track is applied to, use list_entity_tracks (which lists track instances by their parent entity); to check completion, the track-tasks' own statuses are the proxy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trackIdYes

Implementation Reference

  • Zod schema for show_track (requires trackId: positive integer) and handler function that calls capsuleGet on GET /tracks/{id}
    export const showTrackSchema = z.object({
      trackId: z.number().int().positive(),
    });
    
    export async function showTrack(input: z.infer<typeof showTrackSchema>) {
      const { data } = await capsuleGet<{ track: unknown }>(`/tracks/${input.trackId}`);
      return data;
    }
  • Handler function that executes show_track logic: makes a GET request to /tracks/{trackId} and returns the track data
    export async function showTrack(input: z.infer<typeof showTrackSchema>) {
      const { data } = await capsuleGet<{ track: unknown }>(`/tracks/${input.trackId}`);
      return data;
    }
  • src/server.ts:927-933 (registration)
    Registration of the show_track tool with description, schema, and handler via registerTool helper
    registerTool(
      server,
      "show_track",
      "Fetch a single track instance by id. Returns the minimal Capsule projection: id, description, trackDateOn, direction, and the array of tasks attached to the track. Capsule's GET /tracks/{id} does NOT include a trackDefinition link, an entity reference, or a completion field — to find the entity a track is applied to, use list_entity_tracks (which lists track instances by their parent entity); to check completion, the track-tasks' own statuses are the proxy.",
      showTrackSchema,
      showTrack,
    );
  • Import of showTrackSchema and showTrack from ./tools/tracks.js into the server
    import {
      listEntityTracksSchema,
      listEntityTracks,
      showTrackSchema,
      showTrack,
      applyTrackSchema,
  • The registerTool helper function that wraps handlers in MCP text-content responses and registers them with the McpServer
    export function registerTool<Schema extends z.ZodObject<ZodRawShape>>(
      server: McpServer,
      name: string,
      description: string,
      schema: Schema,
      handler: (input: z.infer<Schema>) => Promise<unknown>,
    ): void {
      // Use the SDK config-form registerTool with the full Zod schema. The
      // deprecated shape overload rebuilds z.object(schema.shape), which drops
      // object-level refinements such as superRefine.
      const registerWithSchema = server.registerTool.bind(server) as (
        toolName: string,
        config: { description: string; inputSchema: Schema },
        callback: (input: z.infer<Schema>) => Promise<CallToolResult>,
      ) => void;
    
      registerWithSchema(name, { description, inputSchema: schema }, async (input) => {
        const result = await handler(input);
        return wrapAsText(result);
      });
    }
Behavior5/5

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

With no annotations, the description fully discloses critical behavioral traits: the API call does not include trackDefinition link, entity reference, or completion field. It also clarifies the minimal projection returned. No contradictions.

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?

Four concise sentences with front-loaded purpose. Every sentence adds unique value, no redundancy.

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

Completeness5/5

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

For a simple single-fetch tool with one parameter and no output schema, the description covers return fields, exclusions, and related tools comprehensively. Completely adequate for the complexity.

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

Parameters2/5

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

The single parameter trackId is implied in 'by id' but not explicitly described or connected to the schema. The schema has 0% description coverage, so the description adds minimal value beyond the schema's own constraints.

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 it fetches a single track by id and lists the specific return fields (id, description, trackDateOn, direction, tasks). It also distinguishes itself from siblings by explicitly naming list_entity_tracks for entity lookup and track-tasks for completion checks.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when not to use this tool: for entity reference use list_entity_tracks, for completion check track-tasks. This clearly differentiates it from alternatives.

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/soil-dev/capsulemcp'

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