Skip to main content
Glama

get_blog_post

Retrieve a specific blog post from the DevHub CMS by providing its unique post ID to access content details.

Instructions

Get a single blog post

Args: post_id: Blog post id

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
post_idYes

Implementation Reference

  • The handler function for the 'get_blog_post' tool. It fetches a blog post by its ID from the DevHub CMS API using an authenticated client and returns a formatted string with the post ID, title, date, and HTML content. The @mcp.tool() decorator also serves as the registration mechanism in FastMCP.
    @mcp.tool() def get_blog_post(post_id: int) -> str: """Get a single blog post Args: post_id: Blog post id """ client, base_url = get_client() r = client.get('{}posts/{}/'.format(base_url, post_id)) post = r.json() return f""" Post ID: {post['id']} Title: {post['title']} Date: {post['date']} Content (HTML): {post['content']} """

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