Skip to main content
Glama
devhub

DevHub CMS MCP

Official
by devhub

update_blog_post

Modify existing blog posts in DevHub CMS by updating titles and HTML content while maintaining proper heading structure.

Instructions

Update a single blog post

Args:
    post_id: Blog post ID
    title: Blog post title
    content: HTML content of blog post. Should not include a <h1> tag, only h2+

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
post_idYes
titleNo
contentNo

Implementation Reference

  • The handler function decorated with @mcp.tool(), which registers and implements the update_blog_post tool. It conditionally updates the title and/or content of a blog post via the DevHub API and returns the updated post details.
    @mcp.tool()
    def update_blog_post(post_id: int, title: str = None, content: str = None) -> str:
        """Update a single blog post
    
        Args:
            post_id: Blog post 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 = {}
        if content:
            payload['content'] = content
        if title:
            payload['title'] = title
        r = client.put(
            '{}posts/{}/'.format(base_url, post_id),
            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 the full burden of behavioral disclosure. It states 'Update a single blog post', implying a mutation operation, but doesn't cover critical aspects like required permissions, whether changes are reversible, error handling, or response format. The HTML content guideline is useful but insufficient for a mutation tool with zero annotation coverage.

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, starting with the core purpose 'Update a single blog post'. The parameter details are listed concisely, though the HTML guideline could be integrated more smoothly. There's minimal wasted text, making it efficient for quick understanding.

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 a mutation tool with 3 parameters, 0% schema description coverage, no annotations, and no output schema, the description is incomplete. It lacks information on behavioral traits (e.g., side effects, auth needs), usage context, and return values, leaving significant gaps for an AI agent to rely on.

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 adds meaningful context for parameters: it clarifies that 'post_id' is a 'Blog post ID', 'title' is a 'Blog post title', and 'content' is 'HTML content of blog post' with a specific guideline about avoiding <h1> tags. Since schema description coverage is 0%, this compensates somewhat, but it doesn't fully explain all three parameters (e.g., format of post_id, constraints on title).

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 'Update' and resource 'a single blog post', making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'create_blog_post' or 'get_blog_post', though the action 'Update' implies it modifies existing posts rather than creating new ones or retrieving them.

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. It doesn't mention prerequisites (e.g., needing an existing post_id), exclusions, or comparisons to siblings like 'create_blog_post' for new posts or 'get_blog_post' for retrieval, leaving usage context unclear.

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