Skip to main content
Glama

delete_caption

Remove a caption track from a YouTube video by providing its track ID.

Instructions

Delete a caption track by ID. Use list_captions to find the track ID first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
caption_idYesCaption track ID to delete.

Implementation Reference

  • The handler for the 'delete_caption' tool. It calls client.deleteCaption(args.caption_id) and returns a success message.
    server.tool(
      "delete_caption",
      "Delete a caption track by ID. Use list_captions to find the track ID first.",
      deleteCaptionSchema,
      async (args) => {
        await client.deleteCaption(args.caption_id);
        return {
          content: [
            {
              type: "text" as const,
              text: `Deleted caption track ${args.caption_id}.`,
            },
          ],
        };
      },
  • Input schema for delete_caption, requiring a 'caption_id' string field.
    const deleteCaptionSchema = {
      caption_id: z.string().describe("Caption track ID to delete."),
    };
  • YouTubeClient method that sends a DELETE request to the YouTube Data API v3 /captions endpoint with the caption ID.
    deleteCaption(captionId: string): Promise<void> {
      const url = new URL(`${DATA_API}/captions`);
      url.searchParams.set("id", captionId);
      return this.request<void>(url.toString(), { method: "DELETE" });
    }
  • src/server.ts:51-51 (registration)
    Registration of caption tools (including delete_caption) on the MCP server instance.
    registerCaptionTools(s, youtube);
Behavior3/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. It states it deletes a caption track, indicating a destructive operation, but it does not mention authorization, rate limits, error behavior (e.g., if ID does not exist), or whether the deletion is irreversible.

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 concise sentences with no redundant information. The purpose is front-loaded, and the usage guidance follows naturally. Every word earns its place.

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?

Given the tool's simplicity (one parameter, no output schema, no nested objects), the description covers the essential purpose and prerequisite. However, it could be more complete by noting any irreversible nature or confirmation behavior, but overall it is adequate for an agent to use correctly.

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 desccription for caption_id is 'Caption track ID to delete.', which already conveys the parameter's purpose. The tool description adds no additional semantics beyond what the schema provides. Since schema description coverage is 100%, baseline 3 is appropriate.

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 uses a specific verb 'delete' and resource 'caption track', clearly stating the action and how to identify the track (by ID). It also distinguishes from siblings by referencing list_captions to find the ID.

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 explicitly advises using list_captions first to obtain the track ID, providing a necessary prerequisite. It does not elaborate on when not to use the tool, but for a delete operation, this is reasonable.

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/miller-joe/youtube-mcp'

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