Skip to main content
Glama

strapi_list_authors

Retrieve a complete list of all authors from the Strapi CMS to manage content attribution and user permissions.

Instructions

List all authors

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for 'strapi_list_authors' tool. Fetches the list of authors from Strapi CMS using the content-manager API and returns the JSON response.
    async listAuthors (headers) {
      const response = await axios.get(
        `${this.strapiUrl}/content-manager/collection-types/api::author.author`,
        { headers }
      )
    
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(response.data, null, 2)
        }]
      }
    }
  • Input schema definition for the tool, registered in the ListToolsRequestHandler. No input parameters required.
    {
      name: 'strapi_list_authors',
      description: 'List all authors',
      inputSchema: {
        type: 'object',
        properties: {}
      }
    },
  • index.js:380-553 (registration)
    Registration of the tool handler in the switch statement within setupHandlers() method, dispatching calls to listAuthors.
            case 'strapi_list_authors':
              return await this.listAuthors(headers)
    
            case 'strapi_list_categories':
              return await this.listCategories(headers)
    
            case 'strapi_list_tags':
              return await this.listTags(headers)
    
            // Tutorial operations
            case 'strapi_create_tutorial':
              return await this.createTutorial(headers, request.params.arguments)
    
            case 'strapi_list_tutorials':
              return await this.listTutorials(headers, request.params.arguments)
    
            case 'strapi_get_tutorial':
              return await this.getTutorial(headers, request.params.arguments)
    
            case 'strapi_update_tutorial':
              return await this.updateTutorial(headers, request.params.arguments)
    
            case 'strapi_publish_tutorial':
              return await this.publishTutorial(headers, request.params.arguments)
    
            // Event operations
            case 'strapi_create_event':
              return await this.createEvent(headers, request.params.arguments)
    
            case 'strapi_list_events':
              return await this.listEvents(headers, request.params.arguments)
    
            case 'strapi_get_event':
              return await this.getEvent(headers, request.params.arguments)
    
            case 'strapi_update_event':
              return await this.updateEvent(headers, request.params.arguments)
    
            case 'strapi_publish_event':
              return await this.publishEvent(headers, request.params.arguments)
    
            default:
              throw new Error(`Unknown tool: ${request.params.name}`)
          }
        } catch (error) {
          return {
            content: [{
              type: 'text',
              text: `Error: ${error.message}`
            }],
            isError: true
          }
        }
      })
    }
    
    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)
        }]
      }
    }
    
    async listBlogPosts (headers, args = {}) {
      const { page = 1, pageSize = 25, status = 'all' } = args
    
      const response = await axios.get(
        `${this.strapiUrl}/content-manager/collection-types/api::blog-post.blog-post`,
        {
          headers,
          params: {
            page,
            pageSize
          }
        }
      )
    
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(response.data, null, 2)
        }]
      }
    }
    
    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)
        }]
      }
    }
    
    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)
        }]
      }
    }
    
    async publishBlogPost (headers, args) {
      const data = {
        publishedAt: args.publish ? new Date().toISOString() : null
      }
    
      // 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)
        }]
      }
    }
    
    async listAuthors (headers) {
      const response = await axios.get(
        `${this.strapiUrl}/content-manager/collection-types/api::author.author`,
        { headers }
      )
    
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(response.data, null, 2)
        }]
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'List all authors' implies a read-only operation, but it doesn't specify whether this requires authentication, how results are returned (e.g., pagination, sorting), or any rate limits. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 ('List all authors') with zero wasted words. It's front-loaded and efficiently communicates the core purpose in three words, making it easy for an agent to parse quickly.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally complete. It states what the tool does but lacks behavioral details (e.g., response format, auth needs). For a basic list operation, this is adequate but leaves room for improvement in guiding the agent on usage and output expectations.

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

Parameters4/5

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

The tool has 0 parameters, and schema description coverage is 100% (empty schema). The description doesn't need to add parameter details, so it meets the baseline of 4 for parameterless tools. No additional semantic value is required or provided.

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 'List all authors' clearly states the verb ('List') and resource ('authors'), making the purpose immediately understandable. It distinguishes this tool from siblings like 'strapi_list_blog_posts' by specifying the resource type. However, it doesn't explicitly mention the scope (e.g., all authors without filtering) which would make it a perfect 5.

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 sibling tools like 'strapi_get_blog_post' (for single items) or other list tools, nor does it specify prerequisites or exclusions. The agent must infer usage from the tool name alone.

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