Skip to main content
Glama

delete_access_token

Removes a specific access token from your Storyblok space to manage API access.

Instructions

Delete an access token from the current Storyblok space using the Management API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
token_idYesThe ID of the access token to delete

Implementation Reference

  • The 'delete_access_token' tool handler: registers an MCP tool that accepts a token_id parameter, builds a DELETE request URL to /api_keys/{token_id}, calls the Storyblok Management API, and returns success (204) or failure responses.
    // Tool: delete_access_token
    server.tool(
      'delete_access_token',
      'Delete an access token from the current Storyblok space using the Management API.',
      {
        token_id: z.number().describe('The ID of the access token to delete'),
      },
      async ({ token_id }) => {
        try {
          const url = buildManagementUrl(`/api_keys/${token_id}`);
          const response = await fetch(url, {
            method: 'DELETE',
            headers: getManagementHeaders(),
          });
    
          if (response.status === 204) {
            return {
              content: [{ type: 'text' as const, text: 'Access Token deleted successfully.' }],
            };
          } else {
            return {
              isError: true,
              content: [
                {
                  type: 'text' as const,
                  text: `Failed to delete Access token. Status code: ${response.status}`,
                },
              ],
            };
          }
        } catch (error) {
          if (error instanceof APIError) {
            return createErrorResponse(error);
          }
          throw error;
        }
      }
    );
  • The Zod schema for the 'delete_access_token' tool: the only input parameter is token_id, a required number.
    {
      token_id: z.number().describe('The ID of the access token to delete'),
  • Registration of all access token tools (including delete_access_token) via registerAccessTokens(server) in the tool aggregator.
    registerAccessTokens(server);
  • The export function registerAccessTokens that registers all access token tools on the MCP server.
    export function registerAccessTokens(server: McpServer): void {
  • The buildManagementUrl helper used to construct the DELETE request URL for the delete_access_token handler.
    export function buildManagementUrl(path: string): string {
      return `${API_ENDPOINTS.MANAGEMENT}/spaces/${cfg.spaceId}${path}`;
    }
Behavior2/5

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

Without annotations, the description carries the full burden. It states the destructive action (delete) but fails to disclose behavioral traits such as irreversibility, required permissions, side effects, or result format. The minimal text adds little beyond the tool name and input schema.

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, concise sentence that contains no extraneous information. It is front-loaded and efficient, earning its place with clear action and context.

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 destructive tool with one parameter, no output schema, and no annotations, the description is too minimal. It lacks context such as consequences, typical use cases, or error conditions, leaving the agent with incomplete information for proper 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?

The input schema has 100% coverage with a description for the single parameter (token_id). The description adds no additional meaning beyond what the schema already provides, so the baseline score of 3 is appropriate.

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 identifies the action (delete) and the resource (access token), and explicitly mentions the context (current Storyblok space using Management API). It effectively distinguishes from siblings like create_access_token, update_access_token, and retrieve_multiple_access_tokens.

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 does not mention prerequisites, scenarios where this tool is appropriate, or contrast with other delete tools or access token operations.

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