Skip to main content
Glama

update_blog_post

Modify and update existing blog posts in the DevHub CMS system by specifying the post ID, title, and content. Ensures accurate and timely content management.

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
contentNo
post_idYes
titleNo

Implementation Reference

  • The handler function for the 'update_blog_post' tool. It is decorated with @mcp.tool(), which registers it with the MCP server. The function updates the title and/or content of a blog post via the DevHub CMS API.
    @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']} """

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

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