strapi_get_blog_post
Retrieve a specific blog post from Strapi CMS using its document ID to access content details.
Instructions
Get a specific blog post by document ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes | Blog post document ID |
Implementation Reference
- index.js:483-496 (handler)The main handler function that retrieves a specific blog post by its document ID using the Strapi content-manager API via axios GET request.async getBlogPost (headers, args) { // Strapi 5 uses documentId for single document operations const response = await axios.get( `${this.strapiUrl}/content-manager/collection-types/api::blog-post.blog-post/${args.document_id}`, { headers } ) return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] } }
- index.js:142-148 (schema)Input schema defining the required 'document_id' parameter for the tool.inputSchema: { type: 'object', properties: { document_id: { type: 'string', description: 'Blog post document ID' } }, required: ['document_id'] }
- index.js:139-149 (registration)Tool registration in the ListToolsRequestSchema handler, defining name, description, and input schema.{ name: 'strapi_get_blog_post', description: 'Get a specific blog post by document ID', inputSchema: { type: 'object', properties: { document_id: { type: 'string', description: 'Blog post document ID' } }, required: ['document_id'] } },
- index.js:371-372 (registration)Dispatch case in the CallToolRequestSchema handler that routes to the getBlogPost method.case 'strapi_get_blog_post': return await this.getBlogPost(headers, request.params.arguments)