Skip to content

Commit

Permalink
⬆️ 📚 BUmp glazed and update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
wesen committed Feb 12, 2025
1 parent bf9b8c8 commit 793f5c3
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 28 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,50 @@ go-go-mcp start --transport stdio
go-go-mcp start --transport sse --port 3001
```

The server automatically watches configured repositories and files for changes, reloading tools when:
- Files are added or removed from watched directories
- Tool configuration files are modified
- Repository structure changes

This allows for dynamic tool updates without server restarts.

#### Server Tools

You can interact with tools directly without starting a server using the `server tools` commands:

```bash
# List available tools using the 'all' profile
go-go-mcp server tools list --profile all

# List only system monitoring tools
go-go-mcp server tools list --profile system

# Call a tool directly
go-go-mcp server tools call system-monitor --args format=json,metrics=cpu,memory

# Call a tool with JSON arguments
go-go-mcp server tools call calendar-event --json '{
"title": "Team Meeting",
"start_time": "2024-02-01 10:00",
"duration": 60
}'
```

The available tools depend on the selected profile:
```bash
# System monitoring profile
go-go-mcp server tools list --profile system
# Shows: system-monitor, disk-usage, etc.

# Calendar profile
go-go-mcp server tools list --profile calendar
# Shows: calendar-event, calendar-availability, etc.

# Data analysis profile
go-go-mcp server tools list --profile data
# Shows: data-analyzer, data-visualizer, etc.
```

#### Client Mode

Use the client subcommand to interact with an MCP server:
Expand Down
25 changes: 0 additions & 25 deletions cmd/go-go-mcp/cmds/client/version.go

This file was deleted.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ toolchain go1.23.3

require (
github.com/JohannesKaufmann/html-to-markdown v1.6.0
github.com/go-go-golems/clay v0.1.25
github.com/go-go-golems/clay v0.1.26
github.com/go-go-golems/geppetto v0.4.34
github.com/go-go-golems/glazed v0.5.28
github.com/go-go-golems/parka v0.5.17
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/go-go-golems/clay v0.1.25 h1:o7/rGaCmoHy9paue2t23N44ne8fcGOMsKLC1T5ZUios=
github.com/go-go-golems/clay v0.1.25/go.mod h1:oS1t0/5pDbMpO+WqkKh94ddokbivW3dDX8Zqvy4JxYw=
github.com/go-go-golems/clay v0.1.26 h1:JUw2QR4FIZ03zGBu/Ty/wc0ekZ8LWIm333+lx10CMVo=
github.com/go-go-golems/clay v0.1.26/go.mod h1:oS1t0/5pDbMpO+WqkKh94ddokbivW3dDX8Zqvy4JxYw=
github.com/go-go-golems/geppetto v0.4.34 h1:kVQqVqrXPPa+4tRPqAxTbvOAomM9XKd255nuUdBFCfE=
github.com/go-go-golems/geppetto v0.4.34/go.mod h1:HGEsHKvH8HKH89CLWIcueYm46bue7LdFTtsFos3Uzyo=
github.com/go-go-golems/glazed v0.5.28 h1:5ipOnzkhjfuxEP0LARNuAiXe2syPIPnywAvY98th6tk=
Expand Down
84 changes: 84 additions & 0 deletions pkg/doc/topics/03-mcp-in-practice.md
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,35 @@ Key concepts:

Now we can start the MCP server with different tool sets based on our needs:

### File Watching

The server automatically watches configured repositories and files for changes. This means you can:
- Add or remove tools while the server is running
- Modify tool configurations in real-time
- Update tool implementations without restarts

File watching is enabled by default and can be controlled through the configuration:

```yaml
profiles:
development:
tools:
directories:
- path: ./tools/system
watch: true # Enable watching for this directory
- path: ./tools/static
watch: false # Disable watching for static tools
files:
- path: ./tools/special-tool.yaml
watch: true # Watch individual files too
```

When changes are detected:
1. The server reloads affected tools
2. New tools become immediately available
3. Removed tools are unregistered
4. Modified tools are updated in-place

### All Tools

Start the server with all available tools:
Expand All @@ -683,6 +712,13 @@ go-go-mcp start \
--profile all \
--transport sse \
--port 3001
# In another terminal, watch tools being loaded
tail -f go-go-mcp.log
# Add a new tool while server is running
cp new-tool.yaml tools/system/
# Watch the log to see it being loaded
```

### System Monitoring
Expand All @@ -697,6 +733,54 @@ go-go-mcp start \
--port 3001
```

### Direct Tool Interaction

The `server tools` commands allow you to interact with tools directly without starting a server:

```bash
# List tools in the system profile
go-go-mcp server tools list --profile system
# Expected output:
# NAME DESCRIPTION
# system-monitor Monitor system resources and performance
# disk-usage Analyze disk space usage
# process-list List and filter running processes
# Call system-monitor with JSON arguments
go-go-mcp server tools call system-monitor --json '{
"format": "json",
"metrics": ["cpu", "memory", "disk"],
"watch": false
}'
# Call disk-usage with key-value arguments
go-go-mcp server tools call disk-usage \
--args directory=/home,unit=GB,type=*.log
# Switch to calendar profile and list tools
go-go-mcp server tools list --profile calendar
# Expected output:
# NAME DESCRIPTION
# calendar-event Manage calendar events and meetings
# calendar-availability Check calendar availability
# Create a calendar event
go-go-mcp server tools call calendar-event --json '{
"title": "Team Meeting",
"start_time": "2024-02-01 10:00",
"duration": 60,
"attendees": ["team@example.com"]
}'
```

This is particularly useful for:
- Testing tools during development
- Automation and scripting
- CI/CD pipelines
- Quick tool execution without server overhead

### Data Analysis

Start with data analysis tools:
Expand Down

0 comments on commit 793f5c3

Please sign in to comment.