Skip to main content
Glama

get_draft

Retrieve a draft post's full content, including title, body, and metadata, using its unique ID from the Substack platform.

Instructions

Get the full content of a draft post by ID. Returns title, body, metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
draft_idYesThe draft ID to retrieve

Implementation Reference

  • The 'get_draft' tool registration with its handler function. Uses Zod schema to validate draft_id parameter, calls client.getDraft(), and returns the draft data (id, title, subtitle, body, audience, word_count, created_at, updated_at) as JSON.
    server.tool(
      "get_draft",
      "Get the full content of a draft post by ID. Returns title, body, metadata.",
      {
        draft_id: z.number().describe("The draft ID to retrieve"),
      },
      async ({ draft_id }) => {
        const draft = await client.getDraft(draft_id);
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(
                {
                  id: draft.id,
                  title: draft.draft_title,
                  subtitle: draft.draft_subtitle,
                  body: draft.draft_body,
                  audience: draft.audience,
                  word_count: draft.word_count,
                  created_at: draft.draft_created_at,
                  updated_at: draft.draft_updated_at,
                },
                null,
                2,
              ),
            },
          ],
        };
      },
    );
  • The getDraft method in SubstackClient that makes the actual HTTP GET request to the Substack API endpoint /api/v1/drafts/{id} to fetch a single draft by ID.
    async getDraft(id: number): Promise<SubstackDraft> {
      return this.request<SubstackDraft>(
        `${this.publicationUrl}/api/v1/drafts/${id}`,
      );
    }
  • The SubstackDraft interface defining the structure of draft data returned by the get_draft tool, including id, draft_title, draft_subtitle, draft_body, audience, word_count, and timestamps.
    export interface SubstackDraft {
      id: number;
      draft_title: string;
      draft_subtitle: string | null;
      draft_body: string | null;
      draft_bylines: Array<{ id: number; is_guest: boolean }>;
      audience: string;
      type: string;
      word_count: number;
      cover_image: string | null;
      section_id: number | null;
      draft_created_at: string;
      draft_updated_at: string;
    }
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. It mentions the return values (title, body, metadata), which is helpful, but doesn't cover other behavioral traits such as error handling (e.g., what happens if the ID is invalid), permissions required, or performance aspects like rate limits. For a read operation with no annotations, this leaves significant gaps in understanding how the tool behaves beyond basic functionality.

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 a single, efficient sentence that front-loads the core action and resource, followed by a brief mention of return values. Every word earns its place with no redundancy or waste, making it highly concise and well-structured for quick understanding.

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 low complexity (single parameter, no nested objects) and lack of output schema, the description is moderately complete. It covers the basic purpose and return values, but without annotations or output schema, it misses details on error cases, permissions, or data format. For a simple read tool, this is adequate but leaves room for improvement in behavioral 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 100% description coverage, with 'draft_id' documented as 'The draft ID to retrieve.' The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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

Purpose4/5

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

The description clearly states the action ('Get the full content') and resource ('a draft post by ID'), specifying what the tool does. It distinguishes from siblings like 'list_drafts' (which lists multiple drafts) and 'get_post' (which retrieves published posts), though it doesn't explicitly name these alternatives. The purpose is specific but could be slightly more differentiated.

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 mentioning 'by ID,' suggesting it's for retrieving a specific draft when you have its ID. However, it doesn't provide explicit guidance on when to use this versus alternatives like 'list_drafts' for browsing or 'get_post' for published content. No exclusions or prerequisites are stated, leaving usage context somewhat inferred.

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/conorbronsdon/substack-mcp'

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