get_blog
Retrieve detailed information about a blog post by specifying the website ID and blog post ID.
Instructions
Get blog post details.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| website_id | Yes | The website ID | |
| blog_id | Yes | The blog post ID |
Implementation Reference
- server/index.js:663-675 (registration)Registration of the 'get_blog' tool via server.tool() with the MCP server.
server.tool( "get_blog", "Get blog post details.", { website_id: z.string().describe("The website ID"), blog_id: z.string().describe("The blog post ID"), }, { title: "Get Blog Details", readOnlyHint: true, destructiveHint: false, openWorldHint: false }, async ({ website_id, blog_id }) => { const data = await apiCall(`/v1/workspace/website/${website_id}/blogs/${blog_id}`, "GET"); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } ); - server/index.js:666-669 (schema)Input schema: website_id (string) and blog_id (string) defined using Zod.
{ website_id: z.string().describe("The website ID"), blog_id: z.string().describe("The blog post ID"), }, - server/index.js:671-674 (handler)Handler function that calls GET /v1/workspace/website/{website_id}/blogs/{blog_id} and returns results.
async ({ website_id, blog_id }) => { const data = await apiCall(`/v1/workspace/website/${website_id}/blogs/${blog_id}`, "GET"); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } - server/index.js:112-123 (helper)The apiCall helper used by the handler to make authenticated HTTP requests to the Lindo API.
async function apiCall(path, method, body) { const url = `${BASE_URL}${path}`; const res = await fetch(url, { method, headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json", }, ...(body ? { body: JSON.stringify(body) } : {}), }); return res.json(); }