@@ -19,10 +19,10 @@ require 'tiny_mcp'
19
19
class WeatherTool < TinyMCP ::Tool
20
20
name ' get_weather'
21
21
desc ' Get current weather for a city'
22
- arg :city , :string , ' City name'
23
- opt :units , :string , ' Temperature units (celsius/fahrenheit) '
22
+ arg :city , :string , ' City name' # required
23
+ opt :units , :string , ' Temperature units (c/f) ' # optional
24
24
25
- def call (city: , units: ' celsius ' )
25
+ def call (city: , units: ' c ' )
26
26
# Your implementation here
27
27
" Weather in #{ city } : 20°C, sunny"
28
28
end
42
42
TinyMCP .serve(WeatherTool , TimeTool )
43
43
```
44
44
45
- You can put this in a bin/mcp file for example, and make it executable:
45
+ You can put this in a ` bin/mcp ` file for example, and make it executable:
46
46
47
47
``` bash
48
48
chmod +x bin/mcp
@@ -54,7 +54,7 @@ Then add it to Claude Code:
54
54
claude mcp add my-mcp bin/mcp
55
55
```
56
56
57
- The server reads JSON-RPC requests from stdin and writes responses to stdout, making it compatible with MCP clients .
57
+ The server reads JSON-RPC requests from stdin and writes responses to stdout.
58
58
59
59
## Development
60
60
0 commit comments