poker_deleteSource
Remove radiation sources from task management systems by specifying the source name to delete unwanted or obsolete radioactive materials.
Instructions
放射線源を削除します
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | 削除対象線源名 |
Implementation Reference
- src/mcp/handlers/sourceHandlers.js:61-70 (handler)The handler function for poker_deleteSource (mapped as deleteSource). Validates input and calls taskManager.deleteSource.async deleteSource(args) { try { validateDeleteSourceRequest(args); const result = await taskManager.deleteSource(args.name); return { success: true, message: result }; } catch (error) { logger.error('deleteSourceハンドラーエラー', { args, error: error.message }); throw error; } }
- src/mcp/tools/sourceTools.js:712-725 (schema)The MCP tool schema definition for poker_deleteSource, including input validation schema.{ name: 'poker_deleteSource', description: '放射線源を削除します', inputSchema: { type: 'object', properties: { name: { type: 'string', description: '削除対象線源名' } }, required: ['name'] } }
- src/mcp/server.js:43-57 (registration)Registration of the tools/call handler in MCP server, which dispatches 'poker_deleteSource' to deleteSource handler by stripping 'poker_' prefix.this.server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; logger.info(`MCP Tool実行: ${name}`, { args }); // ハンドラー名をツール名から生成(プレフィックス除去) const handlerName = name.replace('poker_', ''); const handler = this.handlers[handlerName]; if (!handler) { throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`); } return await safeExecute(async () => handler(args), { tool: name })(); });
- src/mcp/handlers/sourceHandlers.js:6-72 (registration)The createSourceHandlers function that defines and returns the deleteSource handler as part of source tools handlers object.export function createSourceHandlers(taskManager) { return { async proposeSource(args) { try { validateSourceRequest(args); const result = await taskManager.proposeSource(args); return { success: true, message: result }; } catch (error) { logger.error('proposeSourceハンドラーエラー', { args, error: error.message }); // マニフェスト仕様のpropose専用エラーコード処理 if (error.code === -32078) { return { success: false, error: error.message, details: { errorCode: error.code, suggestion: 'updateSourceメソッドを使用してください', existingObject: args.name, objectType: '線源' } }; } throw error; } }, async updateSource(args) { try { validateUpdateSourceRequest(args); const { name, ...updates } = args; const result = await taskManager.updateSource(name, updates); return { success: true, message: result }; } catch (error) { logger.error('updateSourceハンドラーエラー', { args, error: error.message }); // マニフェスト仕様のupdate専用エラーコード処理 if (error.code === -32079) { return { success: false, error: error.message, details: { errorCode: error.code, suggestion: 'proposeSourceメソッドを使用してください', missingObject: args.name, objectType: '線源' } }; } throw error; } }, async deleteSource(args) { try { validateDeleteSourceRequest(args); const result = await taskManager.deleteSource(args.name); return { success: true, message: result }; } catch (error) { logger.error('deleteSourceハンドラーエラー', { args, error: error.message }); throw error; } } }; }