Skip to main content
Glama

delete_content_type

Remove a content type from the Contentstack MCP server by specifying its unique identifier (UID). Ensures clean content architecture and efficient management.

Instructions

Deletes a content type identified by its UID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYesContent type UID to delete

Implementation Reference

  • Handler function that performs the DELETE API request to delete the content type by UID from Contentstack and handles success/error responses.
    async ({ uid }) => { try { const response = await axios.delete(`${API_BASE_URL}/content_types/${uid}`, { headers: getHeaders(), }) return { content: [ { type: 'text', text: `Content type "${uid}" deleted successfully.`, }, ], } } catch (error) { return { content: [ { type: 'text', text: handleError(error as ApiError), }, ], isError: true, } } },
  • Zod input schema defining the 'uid' parameter for the content type to delete.
    { uid: z.string().describe('Content type UID to delete'), },
  • src/index.ts:546-578 (registration)
    MCP server.tool registration for the delete_content_type tool, including schema and handler.
    server.tool( 'delete_content_type', 'Deletes a content type identified by its UID.', { uid: z.string().describe('Content type UID to delete'), }, async ({ uid }) => { try { const response = await axios.delete(`${API_BASE_URL}/content_types/${uid}`, { headers: getHeaders(), }) return { content: [ { type: 'text', text: `Content type "${uid}" deleted successfully.`, }, ], } } 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