Skip to main content
Glama

bulk_restore_assets

Restore multiple deleted assets in Storyblok by providing their IDs, recovering them from trash.

Instructions

Restores multiple previously deleted assets

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsYesList of asset IDs to restore

Implementation Reference

  • The tool handler function for 'bulk_restore_assets'. It validates input (non-empty ids array), calls the API endpoint '/assets/bulk_restore' via apiPost, and returns the JSON response.
    // Tool: bulk_restore_assets
    server.tool(
      'bulk_restore_assets',
      'Restores multiple previously deleted assets',
      {
        ids: z.array(z.number()).describe('List of asset IDs to restore'),
      },
      async ({ ids }) => {
        if (!ids || ids.length === 0) {
          return createErrorResponse('ids list cannot be empty');
        }
    
        try {
          const payload = { ids };
          const data = await apiPost('/assets/bulk_restore', payload);
          return createJsonResponse(data);
        } catch (error) {
          if (error instanceof APIError) {
            return createErrorResponse(error);
          }
          throw error;
        }
      }
    );
  • The Zod schema for the 'bulk_restore_assets' tool input: an array of numbers (ids) describing the asset IDs to restore.
    {
      ids: z.array(z.number()).describe('List of asset IDs to restore'),
    },
  • Registration of the 'bulk_restore_assets' tool on the MCP server via server.tool(). It is exported as part of the registerAssets function.
    server.tool(
      'bulk_restore_assets',
      'Restores multiple previously deleted assets',
      {
        ids: z.array(z.number()).describe('List of asset IDs to restore'),
      },
      async ({ ids }) => {
        if (!ids || ids.length === 0) {
          return createErrorResponse('ids list cannot be empty');
        }
    
        try {
          const payload = { ids };
          const data = await apiPost('/assets/bulk_restore', payload);
          return createJsonResponse(data);
        } catch (error) {
          if (error instanceof APIError) {
            return createErrorResponse(error);
          }
          throw error;
        }
      }
    );
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavior. It only says 'restores' without explaining side effects (e.g., location restoration, permissions, rate limits). This is insufficient for an agent to predict outcomes.

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 a single concise sentence with no wasted words. It front-loads the core action, making it 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?

Despite low complexity (1 param, no output schema), the description omits key context: whether assets can be restored from trash, constraints on ids, or return behavior. It leaves ambiguity for the agent.

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% description coverage for the only parameter 'ids', so the schema already explains it. The description adds no extra meaning, so baseline score of 3 applies.

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 'Restores multiple previously deleted assets', specifying the verb 'restores' and resource 'assets'. It distinguishes from siblings like 'restore_story' and 'restore_component_version'.

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 mentions 'previously deleted assets' but provides no explicit guidance on when to use this tool over alternatives (e.g., restoring via UI or other restore methods). No exclusions or prerequisites are stated.

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