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

Publish a post directly to Hashnode (no draft step)

hashnode_publish_post

Publishes a Markdown blog post directly to a Hashnode publication, with optional tags, cover image, SEO metadata, and scheduling; use draft creation first for a safer workflow.

Instructions

Publish a new blog post directly without creating a draft first. Prefer hashnode_create_draft + hashnode_publish_draft for a safer workflow.

Args:

  • publication_id (string, required): Publication ID (from hashnode_get_me)

  • title (string, required): Post title

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

  • subtitle (string, optional): Short subtitle

  • tags (array, optional): [{ name, slug }] — max 5 tags

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

  • slug (string, optional): Custom URL slug

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

  • meta_title (string, optional): SEO title

  • meta_description (string, optional): SEO description

  • scheduled_at (string, optional): ISO 8601 datetime for scheduled publishing

  • response_format: 'markdown' or 'json'

Returns: post id, title, slug, url, publishedAt, tags

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_publish_post"
  }
}

Input Schema

NameRequiredDescriptionDefault
slugNoCustom URL slug
tagsNoTags as [{ name: 'Cloud Computing', slug: 'cloud-computing' }]
titleYesPost title
subtitleNoShort subtitle
meta_titleNoSEO meta title
scheduled_atNoISO 8601 datetime for scheduled publishing, e.g. '2025-12-31T10:00:00Z'
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.2/5.0
Behavior4/5

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

Annotations already declare openWorldHint=true, idempotentHint=false and destructiveHint=false; the description adds the key trait beyond them – the post goes live immediately with no review step – plus a returns summary. It does not mention that repeat calls create duplicates, but idempotentHint=false already signals that.

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

Conciseness4/5

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

The behavioral caveat and the alternative tool are front-loaded in the first two lines, before the parameter block. The 12-parameter enumeration is somewhat redundant against a fully-described schema, but it is structured and scannable rather than padded prose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 12-parameter mutation tool with no output schema, the definition covers the immediacy risk, the safer alternative, every parameter, and the return fields. Nothing an agent needs to invoke this correctly is missing.

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 coverage is 100%, so the parameter list largely restates what the schema already documents. The one genuine addition is provenance for publication_id ('from hashnode_get_me'), which is useful, but the rest are verbatim copies of schema descriptions.

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?

States a specific verb+resource ('Publish a new blog post') and immediately narrows the scope with 'directly without creating a draft first'. It also names the sibling tools that implement the alternative flow, so an agent can distinguish it from hashnode_create_draft/hashnode_publish_draft 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 routes the agent to 'hashnode_create_draft + hashnode_publish_draft for a safer workflow', which is real when-to-use-else guidance. It stops short of stating the inverse condition (e.g. when one-shot publishing is acceptable), but the trade-off is clear.

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