Skip to main content
Glama

Get Draft Detail

get_draft_detail

Retrieve detailed information about a specific draft by providing its ID. This tool is used for accessing and managing draft content in the Emlog blog system via the MCP server.

Instructions

Get details of a specific draft

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe ID of the draft to retrieve

Implementation Reference

  • The MCP tool handler function for 'get_draft_detail' that fetches the draft using emlogClient.getDraftDetail and returns formatted text output.
    async ({ id }) => {
      try {
        const result = await emlogClient.getDraftDetail(id);
        const draft = result.draft;
        return {
          content: [{
            type: "text",
            text: `Draft Details:\n\nTitle: ${draft.title}\nID: ${draft.id}\nDate: ${draft.date}\nAuthor: ${draft.author_name}\nCategory: ${draft.sort_name || 'Uncategorized'}\nExcerpt: ${draft.excerpt || 'No excerpt'}\n\n--- Content ---\n${draft.content}`
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: `Error: ${error instanceof Error ? error.message : String(error)}`
          }],
          isError: true
        };
      }
    }
  • Input schema definition for the 'get_draft_detail' tool, specifying the required 'id' parameter.
    {
      title: "Get Draft Detail",
      description: "Get details of a specific draft",
      inputSchema: {
        id: z.number().describe("The ID of the draft to retrieve")
      }
    },
  • src/index.ts:607-636 (registration)
    Registration of the 'get_draft_detail' tool on the MCP server using server.registerTool.
    server.registerTool(
      "get_draft_detail",
      {
        title: "Get Draft Detail",
        description: "Get details of a specific draft",
        inputSchema: {
          id: z.number().describe("The ID of the draft to retrieve")
        }
      },
      async ({ id }) => {
        try {
          const result = await emlogClient.getDraftDetail(id);
          const draft = result.draft;
          return {
            content: [{
              type: "text",
              text: `Draft Details:\n\nTitle: ${draft.title}\nID: ${draft.id}\nDate: ${draft.date}\nAuthor: ${draft.author_name}\nCategory: ${draft.sort_name || 'Uncategorized'}\nExcerpt: ${draft.excerpt || 'No excerpt'}\n\n--- Content ---\n${draft.content}`
            }]
          };
        } catch (error) {
          return {
            content: [{
              type: "text",
              text: `Error: ${error instanceof Error ? error.message : String(error)}`
            }],
            isError: true
          };
        }
      }
    );
  • Core helper method in EmlogClient that makes the REST API call to retrieve draft details by ID.
    async getDraftDetail(id: number): Promise<{ draft: EmlogPost }> {
      const queryParams = this.buildParams({ id });
      const response = await this.api.get(`/?rest-api=draft_detail&${queryParams.toString()}`);
      return response.data.data;
    }
Behavior2/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 only states it retrieves details without mentioning whether this is a read-only operation, if it requires authentication, what happens if the draft doesn't exist, or the format of the returned details. This leaves significant gaps for a tool that fetches data.

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, straightforward sentence with no wasted words. It's front-loaded and efficiently conveys the core action, making it easy to parse quickly.

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 complexity of fetching specific data, no annotations, and no output schema, the description is incomplete. It lacks details on behavioral aspects like error handling, return format, or authentication needs, which are crucial for proper tool invocation in this 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 description doesn't add meaning beyond the input schema, which has 100% coverage and clearly documents the 'id' parameter as 'The ID of the draft to retrieve'. Since schema coverage is high, 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 verb ('Get') and resource ('details of a specific draft'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get_draft_list' or 'get_article', which would require more specificity about what 'details' entail.

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?

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't explain when to use 'get_draft_detail' versus 'get_draft_list' or 'get_article', nor does it mention prerequisites like needing a draft ID.

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

Related 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/eraincc/emlog-mcp'

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