remove_logpoint
Remove a debugging logpoint from PHP applications to clean up debugging sessions and stop specific logging operations.
Instructions
Remove a logpoint
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| logpoint_id | Yes | Logpoint ID |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"logpoint_id": {
"description": "Logpoint ID",
"type": "string"
}
},
"required": [
"logpoint_id"
],
"type": "object"
}
Implementation Reference
- src/tools/advanced.ts:183-195 (registration)Registration of the 'remove_logpoint' MCP tool, including description, input schema, and inline handler function.server.tool( 'remove_logpoint', 'Remove a logpoint', { logpoint_id: z.string().describe('Logpoint ID'), }, async ({ logpoint_id }) => { const success = ctx.logpointManager.removeLogpoint(logpoint_id); return { content: [{ type: 'text', text: JSON.stringify({ success, logpoint_id }) }], }; } );
- src/tools/advanced.ts:186-188 (schema)Input schema validation using Zod for the logpoint_id parameter.{ logpoint_id: z.string().describe('Logpoint ID'), },
- src/tools/advanced.ts:189-194 (handler)The MCP tool handler function that invokes the logpointManager to remove the specified logpoint and returns a JSON response indicating success.async ({ logpoint_id }) => { const success = ctx.logpointManager.removeLogpoint(logpoint_id); return { content: [{ type: 'text', text: JSON.stringify({ success, logpoint_id }) }], }; }
- Core helper method in LogpointManager that deletes the logpoint by ID from the internal Map and logs the action.removeLogpoint(id: string): boolean { const removed = this.logpoints.delete(id); if (removed) { logger.debug(`Logpoint removed: ${id}`); } return removed;