asset_delete
Delete assets from your financial portfolio in the Money Manager MCP Server to maintain accurate financial records and remove outdated or incorrect entries.
Instructions
Removes an asset.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| assetId | Yes | Asset ID to delete |
Implementation Reference
- src/tools/handlers.ts:493-512 (handler)The handler function that executes the asset_delete tool: validates input using AssetDeleteInputSchema and calls the Money Manager API /removeAsset endpoint to delete the specified asset./** * Handler for asset_delete tool * Removes an asset */ export async function handleAssetDelete( httpClient: HttpClient, input: unknown, ): Promise<AssetOperationResponse> { const validated = AssetDeleteInputSchema.parse(input); const response = await httpClient.post<ApiOperationResponse>("/removeAsset", { assetId: validated.assetId, }); return { success: response.success !== false && response.result !== "fail", assetId: validated.assetId, message: response.message, }; }
- src/schemas/index.ts:231-238 (schema)Zod input schema for asset_delete tool, requiring assetId string./** * Input schema for asset_delete tool */ export const AssetDeleteInputSchema = z.object({ assetId: AssetIdSchema, }); export type AssetDeleteInput = z.infer<typeof AssetDeleteInputSchema>;
- src/index.ts:275-285 (registration)MCP tool registration in TOOL_DEFINITIONS array, defining name, description, and input schema for the asset_delete tool.{ name: "asset_delete", description: "Removes an asset.", inputSchema: { type: "object" as const, properties: { assetId: { type: "string", description: "Asset ID to delete" }, }, required: ["assetId"], }, },
- src/tools/handlers.ts:807-811 (registration)Internal registration of the handleAssetDelete handler in the toolHandlers map.asset_list: handleAssetList, asset_create: handleAssetCreate, asset_update: handleAssetUpdate, asset_delete: handleAssetDelete,
- src/schemas/index.ts:388-393 (registration)Registration of AssetDeleteInputSchema in the ToolSchemas registry.// Assets asset_list: AssetListInputSchema, asset_create: AssetCreateInputSchema, asset_update: AssetUpdateInputSchema, asset_delete: AssetDeleteInputSchema,