Skip to main content
Glama

strapi_update_blog_post

Modify existing blog posts in Strapi CMS by updating title, content, description, category, or tags using document ID.

Instructions

Update an existing blog post

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
document_idYesBlog post document ID
titleNoNew title
contentNoNew content in MARKDOWN
descriptionNoNew description
category_idNoNew category ID
tag_idsNoNew tag IDs

Implementation Reference

  • Implements the core logic for updating a blog post by constructing update data from input arguments and sending a PUT request to Strapi's content-manager API endpoint.
    async updateBlogPost (headers, args) {
      const data = {}
      if (args.title) data.title = args.title
      if (args.content) data.content = args.content
      if (args.description) data.description = args.description
      if (args.category_id) data.category = args.category_id
      if (args.tag_ids) data.tags = args.tag_ids
    
      // Strapi 5 uses documentId for single document operations
      const response = await axios.put(
        `${this.strapiUrl}/content-manager/collection-types/api::blog-post.blog-post/${args.document_id}`,
        data,
        { headers }
      )
    
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(response.data, null, 2)
        }]
      }
    }
  • Defines the input schema/validation for the tool, specifying required document_id and optional fields like title, content, description, category_id, and tag_ids.
    inputSchema: {
      type: 'object',
      properties: {
        document_id: { type: 'string', description: 'Blog post document ID' },
        title: { type: 'string', description: 'New title' },
        content: { type: 'string', description: 'New content in MARKDOWN' },
        description: { type: 'string', description: 'New description' },
        category_id: { type: 'number', description: 'New category ID' },
        tag_ids: { type: 'array', items: { type: 'number' }, description: 'New tag IDs' }
      },
      required: ['document_id']
    }
  • index.js:150-165 (registration)
    Tool registration in the ListTools response, defining name, description, and schema.
    {
      name: 'strapi_update_blog_post',
      description: 'Update an existing blog post',
      inputSchema: {
        type: 'object',
        properties: {
          document_id: { type: 'string', description: 'Blog post document ID' },
          title: { type: 'string', description: 'New title' },
          content: { type: 'string', description: 'New content in MARKDOWN' },
          description: { type: 'string', description: 'New description' },
          category_id: { type: 'number', description: 'New category ID' },
          tag_ids: { type: 'array', items: { type: 'number' }, description: 'New tag IDs' }
        },
        required: ['document_id']
      }
    },
  • index.js:374-375 (registration)
    Dispatch/registration in the CallToolRequest handler switch statement, routing to the updateBlogPost method.
    case 'strapi_update_blog_post':
      return await this.updateBlogPost(headers, request.params.arguments)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. 'Update an existing blog post' implies a mutation operation but reveals nothing about required permissions, whether changes are reversible, what happens to fields not specified, rate limits, or what the response contains. This is inadequate for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core purpose without any wasted words. It's appropriately sized and front-loaded with the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 6 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what happens during the update, what the response looks like, or any behavioral constraints. The high schema coverage helps with parameters, but other critical context is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 6 parameters thoroughly. The description adds no additional parameter information beyond what's in the schema, so it meets the baseline expectation but doesn't provide extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Update') and resource ('an existing blog post'), making the purpose immediately understandable. However, it doesn't differentiate this update tool from its sibling 'strapi_update_event' and 'strapi_update_tutorial' tools, which have identical descriptions except for the resource type.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (like needing an existing document ID), when not to use it, or how it differs from other update tools or the publish tools available in the sibling list.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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/AINative-Studio/ainative-strapi-mcp-server'

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