Skip to main content
Glama

fetch_space_roles

Retrieve space roles from a Storyblok space, filtered by search query or specific IDs, to manage user permissions and access levels.

Instructions

Retrieves multiple space roles for a given space.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
searchNoSearch query for filtering roles
by_idsNoFilter by specific role IDs

Implementation Reference

  • Handler function for fetch_space_roles: builds query params from optional 'search' and 'by_ids' inputs, then calls apiGet('/space_roles/', params) to retrieve space roles from the Storyblok API.
      async ({ search, by_ids }) => {
        try {
          const params: Record<string, string> = {};
          if (search !== undefined) {
            params.search = search;
          }
          if (by_ids !== undefined && by_ids.length > 0) {
            params.by_ids = by_ids.join(',');
          }
    
          const data = await apiGet('/space_roles/', params);
          return createJsonResponse(data);
        } catch (error) {
          if (error instanceof APIError) {
            return createErrorResponse(error);
          }
          throw error;
        }
      }
    );
  • Input schema for fetch_space_roles: optional 'search' (string) and optional 'by_ids' (array of numbers) for filtering.
    {
      search: z.string().optional().describe('Search query for filtering roles'),
      by_ids: z.array(z.number()).optional().describe('Filter by specific role IDs'),
    },
  • MCP tool registration for fetch_space_roles via server.tool() call inside registerSpaceRoles().
    server.tool(
      'fetch_space_roles',
  • Registration call for the space-roles module in the aggregator registerAllTools function.
    registerSpaceRoles(server);
  • Exported registration function that registers all space role tools including fetch_space_roles.
    export function registerSpaceRoles(server: McpServer): void {
Behavior2/5

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

No annotations are provided, and the description does not disclose behavioral traits such as authentication requirements, rate limits, pagination, or whether the operation is safe/idempotent. The description offers only a minimal statement of functionality.

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

Conciseness4/5

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

The description is one sentence, which is concise. It front-loads the main action, though it could benefit from expanding on parameter usage without losing conciseness.

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 tool has 2 parameters and no output schema, the description should elaborate on how the space is specified and what the response contains. The current description is too vague for an agent to use confidently.

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 explains the parameters. The description adds no additional meaning beyond what the schema provides, meeting the baseline.

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

Purpose3/5

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

The description states the tool retrieves multiple space roles, which distinguishes it from the singular get_space_role sibling. However, it claims 'for a given space' but the input schema lacks a space identifier, making the purpose slightly ambiguous.

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 is given on when to use this tool versus alternatives like get_space_role. The agent cannot determine the appropriate context for using fetch_space_roles.

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/hypescale/storyblok-mcp-server'

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