get_blog_html
Get the full HTML content of a blog post by specifying the website ID and blog post ID.
Instructions
Get the HTML content of a blog post.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| website_id | Yes | The website ID | |
| blog_id | Yes | The blog post ID |
Implementation Reference
- server/index.js:746-758 (registration)Registration of the 'get_blog_html' tool with the MCP server, defining its schema (website_id and blog_id as strings) and handler that calls the API endpoint to fetch blog HTML content.
server.tool( "get_blog_html", "Get the HTML content of a blog post.", { website_id: z.string().describe("The website ID"), blog_id: z.string().describe("The blog post ID"), }, { title: "Get Blog HTML", readOnlyHint: true, destructiveHint: false, openWorldHint: false }, async ({ website_id, blog_id }) => { const data = await apiCall(`/v1/workspace/website/${website_id}/blogs/${blog_id}/html`, "GET"); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } ); - server/index.js:754-757 (handler)Handler function for the 'get_blog_html' tool that makes a GET request to `/v1/workspace/website/${website_id}/blogs/${blog_id}/html` and returns the JSON response as text content.
async ({ website_id, blog_id }) => { const data = await apiCall(`/v1/workspace/website/${website_id}/blogs/${blog_id}/html`, "GET"); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } - server/index.js:749-752 (schema)Input schema for the 'get_blog_html' tool: requires `website_id` (string) and `blog_id` (string), validated with Zod.
{ website_id: z.string().describe("The website ID"), blog_id: z.string().describe("The blog post ID"), }, - server/index.js:112-123 (helper)The `apiCall` helper function used by the tool handler to make authenticated HTTP requests to the Lindo AI 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(); }