DeleteProperty
Remove a property from the database by specifying its ID to maintain data integrity and manage storage efficiently.
Instructions
Delete a property from the database
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| propertyId | Yes | ID of the property to delete |
Implementation Reference
- tools/DeleteProperty.ts:17-26 (handler)The main handler function that implements the DeleteProperty tool logic: deletes the specified property from the database using the db client and returns a success message.export async function DeleteProperty(params: { propertyId: string }) { const { propertyId } = params await db.properties.delete(propertyId) return { success: true, message: `Property '${propertyId}' deleted successfully` } }
- tools.ts:413-421 (registration)Registers the DeleteProperty tool in the exported tools array used by MCP listTools endpoint, defining name, description, and input schema.{ name: 'DeleteProperty', description: 'Delete a property from the database', inputSchema: { type: 'object', properties: { propertyId: { type: 'string', description: 'ID of the property to delete' } }, required: ['propertyId'] } },
- tools.ts:416-420 (schema)Defines the input schema for the DeleteProperty tool: requires a propertyId string.inputSchema: { type: 'object', properties: { propertyId: { type: 'string', description: 'ID of the property to delete' } }, required: ['propertyId'] }
- index.ts:467-478 (registration)Registers and dispatches DeleteProperty tool calls in the main MCP CallToolRequest handler switch statement.case 'DeleteProperty': const deletePropertyResult = await DeleteProperty({ propertyId: args.propertyId as string }) return { content: [ { type: 'text', text: deletePropertyResult.message } ] }
- index.ts:47-47 (registration)Imports the DeleteProperty handler function for use in the MCP server.import { DeleteProperty } from './tools/DeleteProperty.js'