Skip to main content
Glama

timeline_list_tracks

Retrieve all scheduled social media campaigns with pagination controls to manage content automation across multiple platforms.

Instructions

List all tracks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo

Implementation Reference

  • The complete implementation of the 'timeline_list_tracks' tool, including registration via mcp.addTool, input parameters schema with pagination options, and the execute handler that queries the database for planned tracks, applies ordering and pagination, parses responses using trackResponseSchema, and returns a JSON-formatted list.
    mcp.addTool({
      name: 'timeline_list_tracks',
      description: 'List all tracks',
      parameters: z.object({
        limit: z.number().int().positive().max(100).optional().default(50),
        offset: z.number().int().nonnegative().optional().default(0)
      }),
      execute: async (params) => {
        console.error('[Timeline MCP] List tracks called');
        
        try {
          const db = await getDb();
          
          const results = await db.select().from(tracks)
            .where(eq(tracks.type, 'planned'))
            .orderBy(asc(tracks.order))
            .limit(params.limit)
            .offset(params.offset);
          
          console.error('[Timeline MCP] Found tracks:', results.length);
          
          const response = {
            tracks: results.map(track => trackResponseSchema.parse({
              id: track.id,
              name: track.name,
              type: 'schedule',
              order: track.order,
              createdAt: track.createdAt
            })),
            pagination: {
              limit: params.limit,
              offset: params.offset,
              total: results.length
            }
          };
          
          return JSON.stringify(response, null, 2);
        } catch (error) {
          console.error('[Timeline MCP] Error in list_tracks:', error);
          
          return JSON.stringify({
            success: false,
            error: error instanceof Error ? error.message : 'Unknown error occurred',
            stack: error instanceof Error ? error.stack : undefined
          }, null, 2);
        }
      }
    });
  • Output schema used in the tool response to validate and structure track data returned by timeline_list_tracks.
    export const trackResponseSchema = z.object({
      id: z.string(),
      name: z.string(),
      type: z.enum(['schedule']),
      order: z.number(),
      createdAt: z.string().optional()
    });
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'List all tracks' implies a read-only operation, but it doesn't specify any behavioral traits such as pagination behavior (implied by limit/offset parameters), rate limits, authentication needs, or what 'all' entails (e.g., all accessible tracks). This leaves significant gaps in understanding how the tool behaves beyond basic listing.

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 'List all tracks' is extremely concise with only three words, front-loading the core action and resource without any wasted words. It efficiently communicates the basic purpose in a minimal format, making it easy to scan and understand at a glance.

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

Completeness2/5

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

Given the tool's complexity (2 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain the parameters, return values, or behavioral context needed for effective use. While conciseness is high, the lack of details on how to use the tool with its parameters and what to expect in response makes it inadequate for the tool's context.

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?

The input schema has 2 parameters (limit and offset) with 0% description coverage, meaning no parameter details are provided in the schema. The description 'List all tracks' doesn't mention or explain these parameters at all, failing to compensate for the schema's lack of documentation. However, since the tool has parameters, the baseline is adjusted from 4 to 3, as the description adds no semantic value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'List all tracks' clearly states the verb ('List') and resource ('tracks'), making the basic purpose understandable. However, it lacks specificity about what 'tracks' are in this context (e.g., timeline tracks, audio tracks) and doesn't distinguish this tool from its sibling 'timeline_list_scheduled_events', which suggests a similar listing function for a different resource. This makes it vague in differentiation.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any prerequisites, context for usage, or comparisons to sibling tools like 'timeline_list_scheduled_events' for listing scheduled events instead of tracks. Without such information, users must infer usage from the tool name alone, which is insufficient.

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/derekalia/timeline-mcp'

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