Skip to main content
Glama

strapi_publish_tutorial

Publish or unpublish tutorials in Strapi CMS to control content visibility and manage tutorial availability.

Instructions

Publish or unpublish a tutorial

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
document_idYesTutorial document ID
publishNotrue to publish, false to unpublish

Implementation Reference

  • The main handler function that executes the tool logic: updates the tutorial's publishedAt field via PUT request to Strapi Content Manager API to publish or unpublish the tutorial.
    async publishTutorial (headers, args) {
      const data = {
        publishedAt: args.publish ? new Date().toISOString() : null
      }
    
      const response = await axios.put(
        `${this.strapiUrl}/content-manager/collection-types/api::tutorial.tutorial/${args.document_id}`,
        data,
        { headers }
      )
    
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(response.data, null, 2)
        }]
      }
    }
  • Tool schema definition including input schema for document_id (required) and publish boolean (default true).
    {
      name: 'strapi_publish_tutorial',
      description: 'Publish or unpublish a tutorial',
      inputSchema: {
        type: 'object',
        properties: {
          document_id: { type: 'string', description: 'Tutorial document ID' },
          publish: { type: 'boolean', description: 'true to publish, false to unpublish', default: true }
        },
        required: ['document_id']
      }
    },
  • index.js:402-403 (registration)
    Registration of the tool handler in the switch statement within CallToolRequestSchema handler.
    case 'strapi_publish_tutorial':
      return await this.publishTutorial(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 the full burden of behavioral disclosure. It states the action but lacks critical details: it doesn't specify required permissions, whether the operation is reversible, potential side effects, or error conditions. For a mutation tool, this is a significant gap in transparency.

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 extremely concise—a single, clear sentence with no wasted words. It's front-loaded with the core action and resource, making it efficient and easy to parse.

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?

Given the complexity of a mutation tool with no annotations and no output schema, the description is incomplete. It lacks behavioral details (e.g., permissions, reversibility), usage context, and output information, making it inadequate for safe and effective tool invocation.

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 input schema already documents both parameters thoroughly. The description adds no additional semantic context beyond what's in the schema (e.g., it doesn't explain where to find 'document_id' or clarify 'publish' behavior further), resulting in the baseline score.

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 ('publish or unpublish') and resource ('a tutorial'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'strapi_publish_blog_post' or 'strapi_publish_event' beyond the resource type, which prevents a perfect score.

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 (e.g., needing an existing tutorial), exclusions, or comparisons to sibling tools like 'strapi_create_tutorial' or 'strapi_update_tutorial', leaving usage context unclear.

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