mcp-serverlisted
Install: claude install-skill adamw7/tools
# MCP Server Skill
Expose functionality over the Model Context Protocol using `mcp-common`, the
shared scaffolding behind all three servers here (`data` uniqueness,
`code/context`, `adopt`). Transport, registration and error handling are already
solved — a new tool writes none of that.
## The SPI — a tool never mentions the MCP SDK
```java
public class MyTool implements McpTool { // Function<Map<String,Object>, ToolResult>
@Override
public ToolDefinition getToolDefinition() {
return new ToolDefinition("my_tool", "What it does, for the model.",
Map.of("type", "object",
"properties", Map.of("path", Map.of("type", "string")),
"required", List.of("path")));
}
@Override
public ToolResult apply(Map<String, Object> arguments) {
String path = ToolArguments.requiredString(arguments, "path");
return ToolResult.success(answer); // or ToolResult.error(message)
}
}
```
- `ToolDefinition` (name, description, JSON-schema map) and `ToolResult`
(`success` / `error`) are the SPI's **own transport-neutral types**;
`AbstractMcpConfiguration` translates them into the SDK's `Tool` and
`CallToolResult`. Do not import `io.modelcontextprotocol` from a tool.
- Parse arguments with `ToolArguments`: `requiredString`, `requiredInt`,
`optionalString`, `optionalBoolean`, `optionalInt`, `optionalBoundedInt` —
don't hand-roll casts out of the map.
- **Don't catch-and-wrap fo