Skip to main content
Glama
elmapicms

elmapicms-mcp-server

Official
by elmapicms

Update Field

update_field

Update an existing field in a collection by specifying the collection slug, field UUID, and new field properties such as type, label, and name.

Instructions

Update an existing field on a collection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collection_slugYesThe collection slug
field_uuidYesThe UUID of the field to update
typeYesField type
labelYesDisplay label
nameYesField identifier in kebab-case
descriptionNoField description
placeholderNoPlaceholder text
optionsNoField-specific options
validationsNoValidation rules

Implementation Reference

  • Registration of the 'update_field' tool with schema and handler. The input schema defines collection_slug (string), field_uuid (string), type, label, name, and optional description, placeholder, options, and validations. The handler destructures collection_slug and field_uuid, then sends a PUT request to /collections/{collection_slug}/fields/{field_uuid}.
    server.registerTool("update_field", {
      title: "Update Field",
      description: "Update an existing field on a collection",
      inputSchema: {
        collection_slug: z.string().describe("The collection slug"),
        field_uuid: z.string().describe("The UUID of the field to update"),
        type: z.string().describe("Field type"),
        label: z.string().describe("Display label"),
        name: z.string().describe("Field identifier in kebab-case"),
        description: z.string().optional().describe("Field description"),
        placeholder: z.string().optional().describe("Placeholder text"),
        options: z
          .record(z.string(), z.unknown())
          .optional()
          .describe("Field-specific options"),
        validations: z
          .record(z.string(), z.unknown())
          .optional()
          .describe("Validation rules"),
      },
    }, async ({ collection_slug, field_uuid, ...fieldData }) => {
      const result = await client.put(
        `/collections/${collection_slug}/fields/${field_uuid}`,
        fieldData
      );
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    });
  • The handler function for update_field. It receives collection_slug and field_uuid (extracted from parameters), spreads the remaining fieldData, and makes a PUT request to the Elmapi API endpoint /collections/{collection_slug}/fields/{field_uuid}. Returns the JSON-stringified response.
    }, async ({ collection_slug, field_uuid, ...fieldData }) => {
      const result = await client.put(
        `/collections/${collection_slug}/fields/${field_uuid}`,
        fieldData
      );
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    });
  • Input validation schema for update_field using Zod. Defines required fields: collection_slug (string), field_uuid (string), type (string), label (string), name (string). Optional fields: description (string), placeholder (string), options (record), validations (record).
    inputSchema: {
      collection_slug: z.string().describe("The collection slug"),
      field_uuid: z.string().describe("The UUID of the field to update"),
      type: z.string().describe("Field type"),
      label: z.string().describe("Display label"),
      name: z.string().describe("Field identifier in kebab-case"),
      description: z.string().optional().describe("Field description"),
      placeholder: z.string().optional().describe("Placeholder text"),
      options: z
        .record(z.string(), z.unknown())
        .optional()
        .describe("Field-specific options"),
      validations: z
        .record(z.string(), z.unknown())
        .optional()
        .describe("Validation rules"),
    },
Behavior2/5

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

The description only says 'update', implying mutation, but does not disclose behavioral traits such as idempotency, validation, side effects, or required permissions. Since no annotations are provided, the description fails to compensate.

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 is front-loaded. It earns its place without redundancy, but could benefit from slightly more detail 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 9 parameters including nested objects and no output schema, the description is inadequate. It does not explain return values, behavior of nested options/validations, or how updates are applied, leaving significant gaps for an 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?

Schema coverage is 100% with descriptions for each parameter. The description adds no additional meaning beyond the schema, which is acceptable when coverage is high. However, it does not clarify which parameters are typically needed or optional constraints.

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 action 'update' and the resource 'existing field on a collection'. It is specific enough to distinguish from sibling tools like create_field or delete_asset, though it does not elaborate on what aspects are updated.

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, prerequisites, or when not to use it. There is no mention of alternatives or context that would help an agent select this tool over others.

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