Skip to main content
Glama

timeline_remove_track

Delete a track and all its associated events from the Timeline MCP Server to manage social media content automation.

Instructions

Remove a track and all its associated events. WARNING: This will delete all events in the track.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trackIdYes

Implementation Reference

  • Handler function that verifies the track exists, counts associated events, deletes the track (cascading to events), and returns success with details.
    execute: async (params) => {
      const db = await getDb();
      
      // Get track details before deletion
      const [track] = await db.select()
        .from(tracks)
        .where(eq(tracks.id, params.trackId))
        .limit(1);
      
      if (!track) {
        return JSON.stringify({
          success: false,
          message: `Track ${params.trackId} not found`
        }, null, 2);
      }
      
      // Get count of events that will be deleted
      const eventsInTrack = await db.select()
        .from(events)
        .where(eq(events.trackId, params.trackId));
      
      // Delete the track (cascade will handle events)
      await db.delete(tracks).where(eq(tracks.id, params.trackId));
      
      return JSON.stringify({
        success: true,
        message: `Track "${track.name}" removed successfully`,
        deletedEvents: eventsInTrack.length,
        trackType: track.type
      }, null, 2);
    }
  • Input schema using Zod: requires a trackId as a UUID string.
    parameters: z.object({
      trackId: z.string().uuid()
    }),
  • Tool registration via FastMCP's mcp.addTool method, specifying name, description, input schema, and execute handler.
    mcp.addTool({
      name: 'timeline_remove_track',
      description: 'Remove a track and all its associated events. WARNING: This will delete all events in the track.',
      parameters: z.object({
        trackId: z.string().uuid()
      }),
      execute: async (params) => {
        const db = await getDb();
        
        // Get track details before deletion
        const [track] = await db.select()
          .from(tracks)
          .where(eq(tracks.id, params.trackId))
          .limit(1);
        
        if (!track) {
          return JSON.stringify({
            success: false,
            message: `Track ${params.trackId} not found`
          }, null, 2);
        }
        
        // Get count of events that will be deleted
        const eventsInTrack = await db.select()
          .from(events)
          .where(eq(events.trackId, params.trackId));
        
        // Delete the track (cascade will handle events)
        await db.delete(tracks).where(eq(tracks.id, params.trackId));
        
        return JSON.stringify({
          success: true,
          message: `Track "${track.name}" removed successfully`,
          deletedEvents: eventsInTrack.length,
          trackType: track.type
        }, null, 2);
      }
    });
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively communicates that this is a destructive operation ('will delete all events in the track'), which is crucial for a mutation tool. However, it lacks details on permissions, reversibility, or response format, leaving some behavioral aspects unspecified.

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 front-loaded with the core action and includes a critical WARNING in two concise sentences. Every sentence earns its place by clarifying the scope and risk of the operation, with no redundant or unnecessary information.

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?

Given the tool's destructive nature, no annotations, and no output schema, the description is moderately complete. It covers the main action and warning but lacks details on permissions, error handling, or return values. For a mutation tool with zero annotation coverage, more context would be beneficial to fully inform usage.

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

Parameters4/5

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

The input schema has 1 parameter with 0% description coverage, so the description must compensate. It implies the parameter is a track identifier but does not explicitly define 'trackId' or its format. Since there is only one parameter, the baseline is high, but the description adds minimal semantic context beyond the schema's structural definition.

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 specific action ('Remove') and resource ('a track and all its associated events'), distinguishing it from siblings like timeline_remove_scheduled_event (which removes individual events) and timeline_list_tracks (which lists tracks). It explicitly mentions the scope of deletion ('all events in the track'), making the purpose unambiguous.

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 by highlighting the destructive nature with a WARNING, suggesting it should be used cautiously for deletion. However, it does not explicitly state when to use this tool versus alternatives (e.g., timeline_remove_scheduled_event for removing single events) or provide prerequisites. The guidance is implicit rather than explicit.

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