| 131 | } |
| 132 | |
| 133 | function isWriteAction(toolName: string, action: string | undefined): boolean { |
| 134 | const writeActions = WRITE_ACTIONS[toolName] |
| 135 | if (!writeActions) return false |
| 136 | // '*' means the tool is always a write operation regardless of action field |
| 137 | if (writeActions.includes('*')) return true |
| 138 | return Boolean(action && writeActions.includes(action)) |
| 139 | } |
| 140 | |
| 141 | /** Registry of all server tools. Tools self-declare their validation schemas. */ |
| 142 | const baseServerToolRegistry: Record<string, BaseServerTool> = { |