get_post
Retrieve full details of a single crypto news post including title, summary, body, categories, hashtags, and source by providing a slug or numeric ID.
Instructions
Full detail of a single post — title, summary, full body, all categories, hashtags, source attribution. Accepts either a slug (from a previous tool call) or a numeric id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug_or_id | Yes | ||
| lang | No | en-US |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/zipp_mcp/server.py:162-181 (handler)MCP tool handler for 'get_post' — decorated with @mcp.tool, accepts slug_or_id (str) and lang (str), delegates to ZippClient.get_post().
@mcp.tool( name="get_post", description=( "Full detail of a single post — title, summary, full body, all " "categories, hashtags, source attribution. Accepts either a slug " "(from a previous tool call) or a numeric id." ), ) async def get_post( slug_or_id: str, lang: str = _DEFAULT_LANG, ) -> dict[str, Any]: """Get the full content of a single post. Args: slug_or_id: Either the post slug (e.g. "bitcoin-etf-...") or numeric id. lang: BCP-47 language tag (default en-US). """ async with ZippClient() as client: return await client.get_post(slug_or_id=slug_or_id, lang=lang) - src/zipp_mcp/server.py:170-173 (schema)Function signature defines input schema: slug_or_id (str, required) and lang (str, default 'en-US').
async def get_post( slug_or_id: str, lang: str = _DEFAULT_LANG, ) -> dict[str, Any]: - src/zipp_mcp/server.py:162-169 (registration)Registration via @mcp.tool(name='get_post', description=...) decorator on FastMCP instance 'mcp'.
@mcp.tool( name="get_post", description=( "Full detail of a single post — title, summary, full body, all " "categories, hashtags, source attribution. Accepts either a slug " "(from a previous tool call) or a numeric id." ), ) - src/zipp_mcp/client.py:123-131 (helper)ZippClient.get_post() — helper that makes the actual HTTP GET request to /api/v1/news/posts/{slug_or_id} with lang param.
async def get_post( self, *, slug_or_id: str, lang: str = "en-US", ) -> dict[str, Any]: # Path encoding is handled by httpx — slugs are URL-safe by # construction, numeric ids are ASCII digits. return await self._get(f"/posts/{slug_or_id}", params={"lang": lang}) - src/zipp_mcp/client.py:142-148 (helper)_get() internal helper used by get_post — constructs the httpx GET request, raises ZippAPIError on non-2xx, returns JSON.
async def _get(self, path: str, *, params: dict[str, Any]) -> dict[str, Any]: # Drop None values so the upstream doesn't get e.g. ?category=None. clean = {k: v for k, v in params.items() if v is not None} resp = await self._client.get(_API_PREFIX + path, params=clean) if resp.status_code >= 400: raise ZippAPIError(resp.status_code, resp.text) return resp.json()