Skip to main content
Glama

create_entry

Generate and add a new entry for a specific content type in Contentstack MCP, ensuring data aligns with predefined schema requirements.

Instructions

Creates a new entry for a specified content type.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
content_type_uidYesContent type UID
entryYesEntry data according to content type schema

Implementation Reference

  • The main handler function for the 'create_entry' tool. It constructs a POST request payload with the provided entry data and sends it to the Contentstack API endpoint `/content_types/{content_type_uid}/entries` to create a new entry. Returns success message with the new entry UID or error details.
      async ({ content_type_uid, entry }) => {
        try {
          const payload = { entry }
    
          const response = await axios.post(`${API_BASE_URL}/content_types/${content_type_uid}/entries`, payload, {
            headers: getHeaders(),
          })
    
          return {
            content: [
              {
                type: 'text',
                text: `Entry created successfully in content type "${content_type_uid}". Entry UID: ${response.data.entry.uid}`,
              },
            ],
          }
        } catch (error) {
          return {
            content: [
              {
                type: 'text',
                text: handleError(error as ApiError),
              },
            ],
            isError: true,
          }
        }
      },
    )
  • Zod schema defining the input parameters for the 'create_entry' tool: content_type_uid (string) and entry (passthrough object for flexible entry data matching the content type schema).
    {
      content_type_uid: z.string().describe('Content type UID'),
      entry: z.object({}).passthrough().describe('Entry data according to content type schema'),
    },
  • src/index.ts:581-616 (registration)
    Registers the 'create_entry' tool on the MCP server using server.tool(), including name, description, input schema, and handler function.
    server.tool(
      'create_entry',
      'Creates a new entry for a specified content type.',
      {
        content_type_uid: z.string().describe('Content type UID'),
        entry: z.object({}).passthrough().describe('Entry data according to content type schema'),
      },
      async ({ content_type_uid, entry }) => {
        try {
          const payload = { entry }
    
          const response = await axios.post(`${API_BASE_URL}/content_types/${content_type_uid}/entries`, payload, {
            headers: getHeaders(),
          })
    
          return {
            content: [
              {
                type: 'text',
                text: `Entry created successfully in content type "${content_type_uid}". Entry UID: ${response.data.entry.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 'Creates', implying a write operation, but doesn't disclose behavioral traits such as permissions required, whether it's idempotent, error handling, or what happens on success (e.g., returns an ID). This is inadequate for a mutation tool with no annotation coverage.

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 no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly, though it lacks detail due to its brevity.

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 creation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what an 'entry' is, the expected outcome, or error conditions, leaving significant gaps for the agent to operate effectively in this context.

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%, with clear descriptions for both parameters ('content_type_uid' and 'entry'). The description adds no additional meaning beyond the schema, such as explaining the relationship between content type and entry data, so it meets the baseline for high schema coverage without compensating value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the action ('Creates') and resource ('new entry for a specified content type'), which is clear but vague. It doesn't specify what an 'entry' represents in this context or differentiate from sibling tools like 'create_content_type' or 'create_global_field', leaving ambiguity about the scope of creation.

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. For example, it doesn't mention prerequisites like needing a content type first, or contrast with tools like 'update_entry' or 'publish_entry', leaving the agent to infer usage from context alone.

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