Skip to main content
Glama

strapi_create_blog_post

Create new blog posts in Strapi CMS with markdown content, author assignment, and category/tag organization.

Instructions

Create a new blog post in Strapi CMS with markdown content

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesBlog post title
contentYesBlog post content in MARKDOWN format
descriptionNoShort description/excerpt
author_idYesAuthor ID (use strapi_list_authors to find)
category_idNoCategory ID (use strapi_list_categories)
tag_idsNoArray of tag IDs (use strapi_list_tags)
publishedAtNoPublication date (ISO 8601) or null for draft

Implementation Reference

  • The createBlogPost method that executes the tool logic: constructs the post data from arguments and sends a POST request to Strapi's blog-post collection endpoint, returning the response.
    async createBlogPost (headers, args) {
      const data = {
        title: args.title,
        content: args.content,
        description: args.description,
        author: args.author_id,
        category: args.category_id,
        tags: args.tag_ids,
        publishedAt: args.publishedAt || null
      }
    
      const response = await axios.post(
        `${this.strapiUrl}/content-manager/collection-types/api::blog-post.blog-post`,
        data,
        { headers }
      )
    
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(response.data, null, 2)
        }]
      }
    }
  • Input schema for the strapi_create_blog_post tool, defining parameters like title, content (markdown), author_id (required), etc.
    inputSchema: {
      type: 'object',
      properties: {
        title: { type: 'string', description: 'Blog post title' },
        content: { type: 'string', description: 'Blog post content in MARKDOWN format' },
        description: { type: 'string', description: 'Short description/excerpt' },
        author_id: { type: 'number', description: 'Author ID (use strapi_list_authors to find)' },
        category_id: { type: 'number', description: 'Category ID (use strapi_list_categories)' },
        tag_ids: { type: 'array', items: { type: 'number' }, description: 'Array of tag IDs (use strapi_list_tags)' },
        publishedAt: { type: 'string', description: 'Publication date (ISO 8601) or null for draft' }
      },
      required: ['title', 'content', 'author_id']
    }
  • index.js:105-121 (registration)
    Tool registration in the ListTools handler, specifying name, description, and input schema for strapi_create_blog_post.
    {
      name: 'strapi_create_blog_post',
      description: 'Create a new blog post in Strapi CMS with markdown content',
      inputSchema: {
        type: 'object',
        properties: {
          title: { type: 'string', description: 'Blog post title' },
          content: { type: 'string', description: 'Blog post content in MARKDOWN format' },
          description: { type: 'string', description: 'Short description/excerpt' },
          author_id: { type: 'number', description: 'Author ID (use strapi_list_authors to find)' },
          category_id: { type: 'number', description: 'Category ID (use strapi_list_categories)' },
          tag_ids: { type: 'array', items: { type: 'number' }, description: 'Array of tag IDs (use strapi_list_tags)' },
          publishedAt: { type: 'string', description: 'Publication date (ISO 8601) or null for draft' }
        },
        required: ['title', 'content', 'author_id']
      }
    },
  • Switch case in CallToolRequest handler that dispatches to the createBlogPost method.
    case 'strapi_create_blog_post':
      return await this.createBlogPost(headers, request.params.arguments)
Behavior2/5

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

With no annotations, the description carries full burden. It states it creates content but doesn't disclose behavioral traits like required permissions, whether it's idempotent, error handling, or what happens on success (e.g., returns ID). 'Create' implies mutation, but details are missing for a tool with 7 parameters.

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 front-loads the core purpose. Every word earns its place with no redundancy or wasted text, making it easy to parse quickly.

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 7 parameters, no annotations, and no output schema, the description is incomplete. It doesn't cover return values, error conditions, or behavioral nuances needed for safe invocation. The high schema coverage helps, but the description lacks context for a create operation.

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 fully documents parameters. The description adds minimal value beyond schema by specifying 'markdown content' for the content parameter, but doesn't explain parameter interactions or provide additional context. Baseline 3 is appropriate given high schema coverage.

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 ('Create a new blog post') and resource ('in Strapi CMS'), specifying markdown content. It distinguishes from siblings like strapi_update_blog_post or strapi_publish_blog_post by focusing on creation, but doesn't explicitly differentiate from other create tools like strapi_create_event.

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?

No guidance on when to use this tool versus alternatives is provided. It doesn't mention when to choose this over strapi_publish_blog_post for publishing, or prerequisites like needing author/category IDs from list tools. Usage is implied but not explicitly stated.

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