datatype-delete
Remove datatypes from the Simplifier platform by specifying their qualified name, including namespace prefixes when needed.
Instructions
#Delete a datatype Deletes the datatype with the given name. The name may be prefixed by the namespace, separated with a slash.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qualifiedName | Yes |
Implementation Reference
- The main handler function for the 'datatype-delete' MCP tool. It extracts the qualified name, computes tracking key, splits into name and namespace using helper, and delegates to simplifier.deleteDataType.}, async ({ qualifiedName: qualifiedName }) => { return wrapToolResult(`delete data type ${qualifiedName}`, async () => { const trackingKey = trackingToolPrefix + toolNameDatatypeDelete const { name: name, namespace: namespace } = splitNamespace(qualifiedName); return simplifier.deleteDataType(name, namespace, trackingKey); }) });
- Zod input schema for the datatype-delete tool, requiring a single 'qualifiedName' string parameter.{ qualifiedName: z.string(), },
- src/tools/server-datatype-tools.ts:106-124 (registration)Registration of the 'datatype-delete' tool on the MCP server using server.tool(), including name, description reference, input schema, execution hints, and inline handler.const toolNameDatatypeDelete = "datatype-delete" server.tool(toolNameDatatypeDelete, datatypeDeleteDescription, { qualifiedName: z.string(), }, { title: "Delete a Data Type", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true }, async ({ qualifiedName: qualifiedName }) => { return wrapToolResult(`delete data type ${qualifiedName}`, async () => { const trackingKey = trackingToolPrefix + toolNameDatatypeDelete const { name: name, namespace: namespace } = splitNamespace(qualifiedName); return simplifier.deleteDataType(name, namespace, trackingKey); }) });
- Utility helper function that parses a qualified datatype name (e.g., 'ns/type') into separate namespace and name components, used in the delete handler.const splitNamespace = (qualifiedName: string): { namespace: string | undefined, name: string } => { const nameStart = qualifiedName.lastIndexOf('/') const namespace = nameStart > 0 ? qualifiedName.substring(0, nameStart) : undefined const name = qualifiedName.substring(nameStart + 1) return { namespace, name } }