Skip to content

Commit 197e8b7

Browse files
Copilotlpcox
andcommitted
Update documentation for tools.json logging
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
1 parent 91af4eb commit 197e8b7

2 files changed

Lines changed: 28 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ DEBUG_COLORS=0 DEBUG=* ./awmg --config config.toml
382382
- `{serverID}.log` - Per-server logs (e.g., `github.log`, `slack.log`) for easier troubleshooting
383383
- `gateway.md` - Markdown-formatted logs for GitHub workflow previews
384384
- `rpc-messages.jsonl` - Machine-readable JSONL format for RPC message analysis
385+
- `tools.json` - Available tools from all backend MCP servers (mapping server IDs to their tool names and descriptions)
385386
- Logs include: startup, client interactions, backend operations, auth events, errors
386387

387388
**Per-ServerID Logging:**
@@ -406,6 +407,29 @@ DEBUG_COLORS=0 DEBUG=* ./awmg --config config.toml
406407
- The `payloadPreview` shows the first 500 characters of the JSON for quick reference
407408
- To access the full data with all actual values, read the JSON file at `payloadPath`
408409

410+
**Tools Catalog (tools.json):**
411+
- The gateway maintains a catalog of all available tools from backend MCP servers in `tools.json`
412+
- Located in the log directory (e.g., `/tmp/gh-aw/mcp-logs/tools.json`)
413+
- Updated automatically during gateway startup when backend servers are registered
414+
- Format: JSON mapping of server IDs to arrays of tool information
415+
- Each tool includes: `name` (tool name without server prefix) and `description`
416+
- Example structure:
417+
```json
418+
{
419+
"servers": {
420+
"github": [
421+
{"name": "search_code", "description": "Search for code in repositories"},
422+
{"name": "get_file_contents", "description": "Get the contents of a file"}
423+
],
424+
"slack": [
425+
{"name": "send_message", "description": "Send a message to a Slack channel"}
426+
]
427+
}
428+
}
429+
```
430+
- Useful for discovering available tools across all configured backend servers
431+
- Can be used by clients or monitoring tools to understand gateway capabilities
432+
409433
## Error Debugging
410434

411435
**Enhanced Error Context**: Command failures include:

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ For detailed setup instructions, building from source, and local development, se
7272
- `{serverID}.log`: Per-server logs for easier troubleshooting
7373
- `gateway.md`: Markdown-formatted logs for GitHub workflow previews
7474
- `rpc-messages.jsonl`: Machine-readable RPC message logs
75+
- `tools.json`: Available tools from all backend MCP servers
7576
- `-p 8000:8000`: Port mapping must match `MCP_GATEWAY_PORT`
7677

7778
MCPG will start in routed mode on `http://0.0.0.0:8000` (using `MCP_GATEWAY_PORT`), proxying MCP requests to your configured backend servers.
@@ -400,6 +401,7 @@ The gateway creates multiple log files for different purposes:
400401
2. **`{serverID}.log`** - Per-server logs (e.g., `github.log`, `slack.log`) for easier troubleshooting of specific backend servers
401402
3. **`gateway.md`** - Markdown-formatted logs for GitHub workflow previews
402403
4. **`rpc-messages.jsonl`** - Machine-readable JSONL format for RPC message analysis
404+
5. **`tools.json`** - Available tools from all backend MCP servers (mapping server IDs to their tool names and descriptions)
403405

404406
### Log File Location
405407

@@ -427,7 +429,8 @@ Example log directory structure:
427429
├── slack.log # Only Slack server logs
428430
├── notion.log # Only Notion server logs
429431
├── gateway.md # Markdown format
430-
└── rpc-messages.jsonl # RPC messages
432+
├── rpc-messages.jsonl # RPC messages
433+
└── tools.json # Available tools
431434
```
432435

433436
**Using the environment variable:**

0 commit comments

Comments
 (0)