Skip to main content
Glama
elmapicms

elmapicms-mcp-server

Official
by elmapicms

Update Entry

update_entry

Update an existing content entry by specifying its collection, UUID, and new field values. Optionally change publication status or locale.

Instructions

Update an existing content entry

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collection_slugYesThe collection slug
uuidYesThe entry UUID
dataYesObject with field names and their new values
statusNoPublication status: 'published' or 'draft'
localeNoLocale code

Implementation Reference

  • The async handler function that executes the update_entry tool logic. It receives collection_slug, uuid, data, status, and locale parameters, builds a request body with optional status/locale, and calls client.put() to update the entry.
    }, async ({ collection_slug, uuid, data, status, locale }) => {
      const body: Record<string, unknown> = { data };
      if (status) body.status = status;
      if (locale) body.locale = locale;
    
      const result = await client.put(`/${collection_slug}/${uuid}`, body);
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    });
  • Input schema for update_entry using Zod. Defines required fields: collection_slug (string), uuid (string), data (record of field values), plus optional status ('published' or 'draft') and locale.
    inputSchema: {
      collection_slug: z.string().describe("The collection slug"),
      uuid: z.string().describe("The entry UUID"),
      data: z
        .record(z.string(), z.unknown())
        .describe("Object with field names and their new values"),
      status: z
        .string()
        .optional()
        .describe("Publication status: 'published' or 'draft'"),
      locale: z.string().optional().describe("Locale code"),
    },
  • Registration of the 'update_entry' tool via server.registerTool(), binding the name, title, description, inputSchema, and handler function.
    server.registerTool("update_entry", {
      title: "Update Entry",
      description: "Update an existing content entry",
      inputSchema: {
        collection_slug: z.string().describe("The collection slug"),
        uuid: z.string().describe("The entry UUID"),
        data: z
          .record(z.string(), z.unknown())
          .describe("Object with field names and their new values"),
        status: z
          .string()
          .optional()
          .describe("Publication status: 'published' or 'draft'"),
        locale: z.string().optional().describe("Locale code"),
      },
    }, async ({ collection_slug, uuid, data, status, locale }) => {
      const body: Record<string, unknown> = { data };
      if (status) body.status = status;
      if (locale) body.locale = locale;
    
      const result = await client.put(`/${collection_slug}/${uuid}`, body);
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    });
  • The ElmapiClient.put() method used by the handler to send a PUT request to /{collection_slug}/{uuid} with the update data in the body.
    async put(path: string, body?: unknown): Promise<unknown> {
      const response = await fetch(`${this.baseUrl}${path}`, {
        method: "PUT",
        headers: this.headers(),
        body: body ? JSON.stringify(body) : undefined,
      });
    
      return this.handleResponse(response);
    }
Behavior2/5

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

With no annotations, the description must fully disclose behavioral traits. It only says 'update', but does not mention idempotency, error states (e.g., what happens if the entry does not exist), permissions required, or side effects. This is insufficient for a mutation tool.

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 that efficiently conveys the tool's purpose. It is front-loaded and avoids unnecessary words. However, it could be slightly expanded to include critical context without losing conciseness.

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 tool has 5 parameters (one nested), no output schema, and multiple sibling crud tools, the description lacks completeness. It does not explain return values, update behavior (partial vs full), or validation rules. More detail is needed for correct usage.

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%, meaning all parameters have descriptions in the input schema itself. The description adds no additional semantic value beyond what the schema already provides. Baseline score 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 the verb 'Update' and the resource 'existing content entry', making it clear what the tool does. However, it does not differentiate itself from sibling tools like update_field or update_collection, which also perform updates on different resources.

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 is provided on when to use this tool versus alternatives such as create_entry or delete_entry. There are no prerequisites mentioned (e.g., that the entry must exist before updating), and no context on when not to use it.

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/elmapicms/elmapicms-mcp-server'

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