Skip to main content
Glama

cms_get_page

Retrieve a CMS page by its ID to access page content and settings.

Instructions

Get a CMS page by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsNoAction parameters as a JSON object

Implementation Reference

  • Handler function that validates params with CmsGetPageSchema, then calls Magento REST API GET /V1/cmsPage/{page_id} with optional store_view_code scope.
    // ── Get Page ──────────────────────────────────────────────────────────
    {
      name: 'cms.get_page',
      description: 'Get a CMS page by ID.',
      riskTier: RiskTier.Safe,
      requiresAuth: true,
      handler: async (params: Record<string, unknown>, context: ActionContext) => {
        const validated = CmsGetPageSchema.parse(params);
        const client = context.getClient();
        const storeCode = validated.scope?.store_view_code;
        return await client.get(`/V1/cmsPage/${validated.page_id}`, undefined, storeCode);
      },
    },
  • Zod validation schema requiring page_id (integer) and optional scope (website_code, store_code, store_view_code, or global).
    export const CmsGetPageSchema = z.object({
      page_id: z.number().int(),
      scope: StoreScopeSchema.optional(),
    });
  • The tool is defined as an ActionDefinition in the array returned by createCmsActions(), with name 'cms.get_page'.
    return [
      // ── Search Pages ──────────────────────────────────────────────────────
  • src/index.ts:75-82 (registration)
    The tool 'cms.get_page' is registered as an MCP tool via the SDK's mcpServer.tool(), with its name converted to 'cms_get_page' (dots to underscores).
    // Register each action as an MCP tool
    for (const action of allActions) {
      // Convert dots to underscores for MCP tool names (e.g. "auth.login" -> "auth_login")
      const toolName = action.name.replace(/\./g, '_');
    
      mcpServer.tool(
        toolName,
        action.description,
Behavior2/5

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

No annotations provided, so description carries full burden. It only states the action without disclosing side effects (e.g., it is read-only, authentication requirements, or error behavior). Minimal transparency.

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

Conciseness3/5

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

Single sentence is concise but overly brief; it lacks front-loaded context like what the tool returns or any qualifying conditions. Conciseness without essential detail is not optimal.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and no annotations, the description should provide more context (e.g., return format, error cases). However, for a simple get-by-ID operation, the description is functionally adequate but could be more complete.

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% but the description adds no extra meaning beyond 'by ID'. The single parameter 'params' is described in schema as 'Action parameters as a JSON object', but description does not clarify what keys are needed (e.g., 'id'). Baseline 3 due to high coverage, but no added value.

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 the verb 'Get' and the resource 'CMS page by ID', distinguishing it from siblings like cms_search_pages which implies search rather than direct retrieval.

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., cms_search_pages). Does not mention prerequisites like needing a valid page ID or any context about when a simple get is appropriate.

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/thomastx05/magento-mcp'

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