Skip to main content
Glama
hashnode-mcp-server
by kieksme

Create a Hashnode draft

hashnode_create_draft

Create a new draft in a Hashnode publication without publishing it. Use it to prepare Markdown posts, tags, and SEO metadata, then publish the draft separately.

Instructions

Create a new draft in a Hashnode publication. Does NOT publish — use hashnode_publish_draft afterwards.

Args:

  • publication_id (string, required): Publication ID

  • title (string, required): Post title

  • content_markdown (string, required): Post content in Markdown

  • subtitle (string, optional): Short subtitle

  • tags (array, optional): Tags as [{ name, slug }] — slug must be lowercase with hyphens

  • cover_image_url (string, optional): URL of cover image

  • slug (string, optional): Custom URL slug (auto-generated from title if omitted)

  • original_article_url (string, optional): Canonical URL for cross-posted articles

  • meta_title (string, optional): SEO meta title

  • meta_description (string, optional): SEO meta description

  • response_format: 'markdown' or 'json'

Returns: draft id, title, slug, tags, updatedAt

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "publication_id": "<publication_id>",
      "title": "<title>",
      "content_markdown": "<content_markdown>"
    },
    "name": "hashnode_create_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
slugNoCustom URL slug (auto-generated if omitted)
tagsNoTags as [{ name: 'Cloud Computing', slug: 'cloud-computing' }]
titleYesPost title
subtitleNoShort subtitle
meta_titleNoSEO meta title
publication_idYesPublication ID
cover_image_urlNoURL of cover image
response_formatNoOutput format: 'markdown' (default) or 'json'markdown
content_markdownYesPost content in Markdown
meta_descriptionNoSEO meta description
original_article_urlNoCanonical URL for cross-posted content

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.1.3
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / tags / items / additionalProperties
      Removed value: -false
  2. First observedv1.1.1

TDQS

A4/5.0
Behavior4/5

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

The annotations already declare readOnly=false, destructive=false, idempotent=false, openWorld=true, so the safety profile is covered. The description adds real behavioral value beyond that: the created entity is a *draft* only (state consequence), and it names the follow-up publish step plus the returned fields. It doesn't mention that repeated calls create duplicate drafts (non-idempotency) or any auth/publication-ownership requirement.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The two-sentence lead is well front-loaded and high value. However, the 11-item Args block almost entirely duplicates a schema that is 100% described, so a substantial share of the text does not earn 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?

For an 11-parameter mutation tool with no output schema, the description does what is needed: it explains the draft-vs-publish lifecycle and enumerates the return payload (draft id, title, slug, tags, updatedAt). Minor gaps remain around auth scope and the effect of omitted vs supplied slug.

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?

Schema description coverage is 100%, so the baseline is 3. The argument list largely restates schema text ('Custom URL slug (auto-generated from title if omitted)' matches the schema verbatim) and adds no format details, validation rules, or defaulting behavior beyond the tag slug note that is already in the schema.

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 opening sentence names a specific verb and resource ('Create a new draft in a Hashnode publication') and immediately contrasts it with the sibling tool hashnode_publish_draft, so an agent can pick it over hashnode_update_draft or hashnode_publish_post without opening a schema.

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?

Explicitly states the boundary — 'Does NOT publish — use hashnode_publish_draft afterwards' — which is the key routing decision between this and the publish sibling. It does not address hashnode_update_draft (when to edit an existing draft) or when to publish a post directly, so it is clear but not exhaustive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.