Skip to main content
Glama

add_blog

Create and publish new blog posts by submitting title and content to the MCP Blog API service.

Instructions

Add a new blog to the mock API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
bodyYes

Implementation Reference

  • main.py:28-32 (handler)
    The handler function for the 'add_blog' tool. It uses the @mcp.tool() decorator for registration and implements the logic to POST a new blog (title and body) to the mock API endpoint, returning the JSON response.
    @mcp.tool() def add_blog(title: str, body: str): """Add a new blog to the mock API.""" response = httpx.post(mock_api_url, json={'title': title, 'body': body}) return response.json()

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/tussanakorn/POC_MCP_Protocol_using_FastMCP'

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