Skip to main content
Glama

retrieve_field_plugins

Retrieve field plugins by context (space, org, partner), filter by ownership or name, and paginate results.

Instructions

Retrieves multiple field plugins (field types) across different contexts.

Args: context (str): 'space', 'org', or 'partner' only_mine (int): 1 = only plugins created by authenticated user page (int): pagination page number per_page (int): plugins per page (max 100) search (str): search filter for plugin name or slug

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contextNoContext: 'space', 'org', or 'partner'space
only_mineNo1 = only plugins created by authenticated user
pageNoPagination page number
per_pageNoPlugins per page (max 100)
searchNoSearch filter for plugin name or slug

Implementation Reference

  • Handler function that executes the 'retrieve_field_plugins' tool logic. Builds URL with query params (context, only_mine, page, per_page, search), performs a GET request to the Storyblok Management API, and returns the response.
      async ({ context, only_mine, page, per_page, search }) => {
        try {
          const baseUrl = `${FIELD_PLUGIN_URLS[context]}/`;
    
          const params: Record<string, string> = {};
          if (only_mine !== undefined) {
            params.only_mine = String(only_mine);
          }
          if (page !== undefined) {
            params.page = String(page);
          }
          if (per_page !== undefined) {
            params.per_page = String(per_page);
          }
          if (search !== undefined) {
            params.search = search;
          }
    
          const url = buildUrlWithParams(baseUrl, params);
          const response = await fetch(url, {
            method: 'GET',
            headers: getManagementHeaders(),
          });
          const data = await handleResponse(response, url);
          return createJsonResponse(data);
        } catch (error) {
          if (error instanceof APIError) {
            return createErrorResponse(error);
          }
          throw error;
        }
      }
    );
  • Zod schema defining input parameters: context (enum: space/org/partner), only_mine, page, per_page, and search.
    {
      context: z.enum(['space', 'org', 'partner']).default('space').describe("Context: 'space', 'org', or 'partner'"),
      only_mine: z.number().optional().default(1).describe('1 = only plugins created by authenticated user'),
      page: z.number().optional().default(1).describe('Pagination page number'),
      per_page: z.number().optional().default(25).describe('Plugins per page (max 100)'),
      search: z.string().optional().describe('Search filter for plugin name or slug'),
    },
  • Registration via server.tool('retrieve_field_plugins', ...) inside the registerFieldPlugins function.
    export function registerFieldPlugins(server: McpServer): void {
      // Tool: retrieve_field_plugins
      server.tool(
        'retrieve_field_plugins',
        `Retrieves multiple field plugins (field types) across different contexts.
    
    Args:
        context (str): 'space', 'org', or 'partner'
        only_mine (int): 1 = only plugins created by authenticated user
        page (int): pagination page number
        per_page (int): plugins per page (max 100)
        search (str): search filter for plugin name or slug`,
        {
          context: z.enum(['space', 'org', 'partner']).default('space').describe("Context: 'space', 'org', or 'partner'"),
          only_mine: z.number().optional().default(1).describe('1 = only plugins created by authenticated user'),
          page: z.number().optional().default(1).describe('Pagination page number'),
          per_page: z.number().optional().default(25).describe('Plugins per page (max 100)'),
          search: z.string().optional().describe('Search filter for plugin name or slug'),
        },
        async ({ context, only_mine, page, per_page, search }) => {
          try {
            const baseUrl = `${FIELD_PLUGIN_URLS[context]}/`;
    
            const params: Record<string, string> = {};
            if (only_mine !== undefined) {
              params.only_mine = String(only_mine);
            }
            if (page !== undefined) {
              params.page = String(page);
            }
            if (per_page !== undefined) {
              params.per_page = String(per_page);
            }
            if (search !== undefined) {
              params.search = search;
            }
    
            const url = buildUrlWithParams(baseUrl, params);
            const response = await fetch(url, {
              method: 'GET',
              headers: getManagementHeaders(),
            });
            const data = await handleResponse(response, url);
            return createJsonResponse(data);
          } catch (error) {
            if (error instanceof APIError) {
              return createErrorResponse(error);
            }
            throw error;
          }
        }
      );
  • Base URL mappings for field plugins by context (space, org, partner).
    const FIELD_PLUGIN_URLS: Record<string, string> = {
      space: 'https://mapi.storyblok.com/v1/field_types',
      org: 'https://mapi.storyblok.com/v1/org_field_types',
      partner: 'https://mapi.storyblok.com/v1/partner_field_types',
    };
  • Top-level registration call: registerFieldPlugins(server) in the registerAllTools function.
    registerFieldPlugins(server);
Behavior4/5

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

No annotations provided, so the description carries the burden. It discloses the read nature ('Retrieves') and key constraints (context types, pagination, search) without contradicting any hidden behavior. It is fairly transparent for a retrieval tool.

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 concise with a clear one-line summary followed by a structured Args list. Every sentence provides necessary information with no wasted words.

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?

The description lacks any mention of return values or output structure. Since no output schema exists, the agent is left without information about what the tool returns, making it incomplete for execution.

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 coverage is 100%, so the schema already defines all parameters. The description repeats parameter meanings without adding significant new semantics beyond the schema descriptions, meeting the baseline for high coverage.

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

Purpose5/5

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

The description clearly states 'Retrieves multiple field plugins (field types) across different contexts,' specifying the action and resource. It distinguishes from the sibling 'retrieve_field_plugin' (singular) by indicating plural retrieval.

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

Usage Guidelines3/5

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

The description lists parameters but does not explicitly state when to use this tool versus alternatives like 'retrieve_field_plugin' or others. Usage context is implied but not detailed, lacking when-not or alternative guidance.

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