Skip to main content
Glama

retrieve_multiple_activities

Fetch activity logs for a Storyblok space, filtered by date, user, or activity type to monitor changes.

Instructions

Retrieves activity logs for a specified Storyblok space.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
created_at_gteNoFilter activities created on or after this date (format: 'YYYY-MM-DD')
created_at_lteNoFilter activities created on or before this date (format: 'YYYY-MM-DD')
by_owner_idsNoFilter by user IDs
typesNoFilter by activity types (e.g., 'Story', 'Component', 'Asset')

Implementation Reference

  • Registration of the 'retrieve_multiple_activities' tool via server.tool(), including schema definition (lines 15-32) and handler logic (lines 33-57). The handler builds query params from optional filters (created_at_gte, created_at_lte, by_owner_ids, types), calls apiGet('/activities/', params), and returns the JSON response.
    export function registerActivities(server: McpServer): void {
      // Tool: retrieve_multiple_activities
      server.tool(
        'retrieve_multiple_activities',
        'Retrieves activity logs for a specified Storyblok space.',
        {
          created_at_gte: z
            .string()
            .optional()
            .describe("Filter activities created on or after this date (format: 'YYYY-MM-DD')"),
          created_at_lte: z
            .string()
            .optional()
            .describe("Filter activities created on or before this date (format: 'YYYY-MM-DD')"),
          by_owner_ids: z
            .array(z.number())
            .optional()
            .describe('Filter by user IDs'),
          types: z
            .array(z.string())
            .optional()
            .describe("Filter by activity types (e.g., 'Story', 'Component', 'Asset')"),
        },
        async ({ created_at_gte, created_at_lte, by_owner_ids, types }) => {
          try {
            const params: Record<string, string> = {};
            if (created_at_gte) {
              params.created_at_gte = created_at_gte;
            }
            if (created_at_lte) {
              params.created_at_lte = created_at_lte;
            }
            if (by_owner_ids && by_owner_ids.length > 0) {
              params.by_owner_ids = by_owner_ids.join(',');
            }
            if (types && types.length > 0) {
              params.types = types.join(',');
            }
    
            const data = await apiGet('/activities/', params);
            return createJsonResponse(data);
          } catch (error) {
            if (error instanceof APIError) {
              return createErrorResponse(error);
            }
            throw error;
          }
        }
      );
  • Zod schema for 'retrieve_multiple_activities' input parameters: optional created_at_gte (string), created_at_lte (string), by_owner_ids (number array), and types (string array).
    {
      created_at_gte: z
        .string()
        .optional()
        .describe("Filter activities created on or after this date (format: 'YYYY-MM-DD')"),
      created_at_lte: z
        .string()
        .optional()
        .describe("Filter activities created on or before this date (format: 'YYYY-MM-DD')"),
      by_owner_ids: z
        .array(z.number())
        .optional()
        .describe('Filter by user IDs'),
      types: z
        .array(z.string())
        .optional()
        .describe("Filter by activity types (e.g., 'Story', 'Component', 'Asset')"),
    },
  • Handler function for 'retrieve_multiple_activities': builds query params from optional filters, makes GET request to /activities/ via apiGet, returns JSON response or error response on APIError.
    async ({ created_at_gte, created_at_lte, by_owner_ids, types }) => {
      try {
        const params: Record<string, string> = {};
        if (created_at_gte) {
          params.created_at_gte = created_at_gte;
        }
        if (created_at_lte) {
          params.created_at_lte = created_at_lte;
        }
        if (by_owner_ids && by_owner_ids.length > 0) {
          params.by_owner_ids = by_owner_ids.join(',');
        }
        if (types && types.length > 0) {
          params.types = types.join(',');
        }
    
        const data = await apiGet('/activities/', params);
        return createJsonResponse(data);
      } catch (error) {
        if (error instanceof APIError) {
          return createErrorResponse(error);
        }
        throw error;
      }
    }
  • Import of registerActivities from './activities.js', which is the registration function containing the tool definition.
    import { registerActivities } from './activities.js';
  • Registration call registerActivities(server) within registerAllTools, which triggers the tool registration on the MCP server.
    registerActivities(server);
Behavior2/5

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

No annotations provided, and the description does not disclose behavioral traits such as read-only status, pagination, or side effects. The description only states the basic action.

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 directly conveys the purpose with no superfluous information.

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 absence of output schema and annotations, and the presence of multiple sibling tools, the description lacks details on return format, pagination, and use cases, making it incomplete.

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% with descriptions for all four parameters, so the description adds no additional parameter meaning beyond the schema. Baseline of 3 is appropriate.

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 clearly states it retrieves activity logs for a Storyblok space, using a specific verb and resource. However, it does not explicitly differentiate it from siblings like 'retrieve_single_activity', though the name implies multiple.

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 on when to use this tool versus alternatives (e.g., retrieve_single_activity) or context like required permissions or prerequisites.

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