Skip to main content
Glama
devhub

DevHub CMS MCP

Official
by devhub

create_blog_post

Generate and publish blog posts in DevHub CMS by providing title, content, and site ID for structured content management.

Instructions

Create a new blog post

Args:
    site_id: Website ID where the post will be published. Prompt the user for this ID.
    title: Blog post title
    content: HTML content of blog post. Should not include a <h1> tag, only h2+

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
site_idYes
titleYes
contentYes

Implementation Reference

  • The @mcp.tool()-decorated function implementing the create_blog_post tool. The decorator handles registration, and the docstring provides the input schema. The function creates a new blog post via the DevHub API and returns details.
    @mcp.tool()
    def create_blog_post(site_id: int, title: str, content: str) -> str:
        """Create a new blog post
    
        Args:
            site_id: Website ID where the post will be published. Prompt the user for this ID.
            title: Blog post title
            content: HTML content of blog post. Should not include a <h1> tag, only h2+
        """
        client, base_url = get_client()
        payload = {
            'content': content,
            'site_id': site_id,
            'title': title,
        }
        r = client.post(
            '{}posts/'.format(base_url),
            json=payload,
        )
        post = r.json()
        return f"""
    Post ID: {post['id']}
    Title: {post['title']}
    Date: {post['date']}
    
    Content (HTML):
    {post['content']}
    """
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions that content 'Should not include a <h1> tag, only h2+' which is useful behavioral guidance, but fails to disclose critical aspects: whether this is a mutation (implied but not stated), what permissions are needed, whether the post is published immediately or saved as draft, what happens on success/failure, or what the return value contains. For a creation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 description is appropriately sized and front-loaded with the core purpose. The parameter explanations are organized in a clear 'Args:' section. While efficient, the 'Prompt the user for this ID' note could be more concise, and the formatting constraint for content might belong in a separate guidelines section rather than inline with the parameter definition.

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 a 3-parameter creation tool with no annotations and no output schema, the description does an adequate job but has clear gaps. It covers parameter meanings well and provides some behavioral guidance about HTML formatting, but misses critical context about the mutation nature, permissions, publication status, and return values. The description is minimally viable but incomplete for a tool that creates content.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description provides excellent parameter semantics despite 0% schema description coverage. It explains what each parameter represents: 'Website ID where the post will be published' for site_id, 'Blog post title' for title, and 'HTML content of blog post' with specific formatting constraints for content. The 'Prompt the user for this ID' guidance for site_id adds practical usage context. This fully compensates for the lack of schema descriptions.

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 'Create' and resource 'blog post', making the purpose immediately understandable. It distinguishes from siblings like 'update_blog_post' by specifying 'new', but doesn't fully differentiate from other creation tools that might exist (though none are listed as siblings). The purpose is specific and actionable.

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?

The description provides no guidance on when to use this tool versus alternatives. While it mentions 'Prompt the user for this ID' for site_id, this is parameter guidance rather than tool selection advice. There's no mention of prerequisites, when not to use it, or how it differs from similar operations like 'update_blog_post' beyond the obvious creation vs. update distinction.

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/devhub/devhub-cms-mcp'

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