Skip to main content
Glama

delete_entry

Removes a specific entry from the content management system by specifying its UID and content type UID. Simplifies data cleanup and management in contentstack-mcp.

Instructions

Deletes an entry identified by its UID and content type UID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
content_type_uidYesContent type UID
entry_uidYesEntry UID to delete

Implementation Reference

  • The handler function that executes the tool logic: sends a DELETE request to the Contentstack API to delete the specified entry and returns success/error messages.
    async ({ content_type_uid, entry_uid }) => {
      try {
        const response = await axios.delete(`${API_BASE_URL}/content_types/${content_type_uid}/entries/${entry_uid}`, {
          headers: getHeaders(),
        })
    
        return {
          content: [
            {
              type: 'text',
              text: `Entry "${entry_uid}" deleted successfully from content type "${content_type_uid}".`,
            },
          ],
        }
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: handleError(error as ApiError),
            },
          ],
          isError: true,
        }
      }
    },
  • Zod input schema defining the parameters: content_type_uid (string) and entry_uid (string).
    {
      content_type_uid: z.string().describe('Content type UID'),
      entry_uid: z.string().describe('Entry UID to delete'),
    },
  • src/index.ts:662-695 (registration)
    The server.tool call that registers the 'delete_entry' tool with name, description, input schema, and handler function.
    server.tool(
      'delete_entry',
      'Deletes an 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 delete'),
      },
      async ({ content_type_uid, entry_uid }) => {
        try {
          const response = await axios.delete(`${API_BASE_URL}/content_types/${content_type_uid}/entries/${entry_uid}`, {
            headers: getHeaders(),
          })
    
          return {
            content: [
              {
                type: 'text',
                text: `Entry "${entry_uid}" deleted successfully from content type "${content_type_uid}".`,
              },
            ],
          }
        } catch (error) {
          return {
            content: [
              {
                type: 'text',
                text: handleError(error as ApiError),
              },
            ],
            isError: true,
          }
        }
      },
    )

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