Skip to main content
Glama

update_entry

Modify existing entries in Contentstack by specifying the content type UID, entry UID, and updated entry data using the update_entry function.

Instructions

Updates an existing entry identified by its UID and content type UID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
content_type_uidYesContent type UID
entryYesUpdated entry data
entry_uidYesEntry UID to update

Implementation Reference

  • The asynchronous handler function for the update_entry tool. It constructs a PUT request to the Contentstack API endpoint for updating an entry, using the provided content_type_uid, entry_uid, and entry data. Returns success message or error.
    async ({ content_type_uid, entry_uid, entry }) => {
      try {
        const payload = { entry }
    
        const response = await axios.put(
          `${API_BASE_URL}/content_types/${content_type_uid}/entries/${entry_uid}`,
          payload,
          {
            headers: getHeaders(),
          },
        )
    
        return {
          content: [
            {
              type: 'text',
              text: `Entry "${entry_uid}" updated successfully in content type "${content_type_uid}".`,
            },
          ],
        }
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: handleError(error as ApiError),
            },
          ],
          isError: true,
        }
      }
    },
  • Zod schema defining the input parameters for the update_entry tool: content_type_uid (string), entry_uid (string), and entry (passthrough object).
    {
      content_type_uid: z.string().describe('Content type UID'),
      entry_uid: z.string().describe('Entry UID to update'),
      entry: z.object({}).passthrough().describe('Updated entry data'),
    },
  • src/index.ts:619-659 (registration)
    Registers the 'update_entry' tool with the MCP server using server.tool(), providing name, description, input schema, and handler function.
    server.tool(
      'update_entry',
      'Updates an existing entry identified by its UID and content type UID.',
      {
        content_type_uid: z.string().describe('Content type UID'),
        entry_uid: z.string().describe('Entry UID to update'),
        entry: z.object({}).passthrough().describe('Updated entry data'),
      },
      async ({ content_type_uid, entry_uid, entry }) => {
        try {
          const payload = { entry }
    
          const response = await axios.put(
            `${API_BASE_URL}/content_types/${content_type_uid}/entries/${entry_uid}`,
            payload,
            {
              headers: getHeaders(),
            },
          )
    
          return {
            content: [
              {
                type: 'text',
                text: `Entry "${entry_uid}" updated successfully in content type "${content_type_uid}".`,
              },
            ],
          }
        } catch (error) {
          return {
            content: [
              {
                type: 'text',
                text: handleError(error as ApiError),
              },
            ],
            isError: true,
          }
        }
      },
    )
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool updates an entry but doesn't disclose behavioral traits such as required permissions, whether changes are reversible, error handling (e.g., if UID is invalid), or side effects (e.g., impact on published status). For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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, efficient sentence with zero waste. It front-loads the core action ('Updates an existing entry') and includes essential identifiers. Every word earns its place, making it appropriately sized and well-structured.

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 complexity of a mutation tool with no annotations and no output schema, the description is incomplete. It lacks information on behavioral aspects (e.g., permissions, side effects), usage context, and return values. While the schema covers parameters, the overall context for safe and effective use is insufficient.

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 description coverage is 100%, so the schema fully documents the three parameters (content_type_uid, entry_uid, entry). The description adds minimal value by mentioning identification by UID and content type UID, but doesn't provide additional semantics beyond what the schema already specifies (e.g., format of UIDs, structure of entry data). Baseline 3 is appropriate as the schema does the heavy lifting.

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 ('Updates') and resource ('an existing entry'), specifying identification by UID and content type UID. It distinguishes from siblings like create_entry, delete_entry, and get_entry by focusing on modification rather than creation, deletion, or retrieval. However, it doesn't explicitly differentiate from update_content_type or update_global_field beyond the resource type.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., entry must exist), exclusions (e.g., not for new entries), or comparisons to siblings like publish_entry/unpublish_entry for workflow states. Usage is implied by the action but lacks explicit context.

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

Related 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/darekrossman/contentstack-mcp'

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