Problem / motivation
In cmd/mcp/serve.go, the MCP server startup log messages hardcode the number of tools, resources, and prompts:
mcpLog.Info("starting MCP server",
"transport", "stdio",
"tools", 46, "resources", 9, "prompts", 6, // hardcoded
)
These values silently become stale whenever tools, resources, or prompts are added or removed. This has likely already drifted from the actual count.
Proposed solution
Either:
- Remove the counts entirely from the log message (simplest).
- Count dynamically if the
mcp-go library exposes a way to query registered tools/resources/prompts from the MCPServer instance.
- Define constants next to the registration functions that are updated alongside tool additions (less ideal but better than inline magic numbers).
The counts appear in two places in serve.go (once for stdio, once for http transport).
Alternatives considered
Leave as-is — but this guarantees the log output will be wrong after the next tool addition, which undermines trust in the log messages.
Additional context
The hardcoded values appear on two separate log lines in runServe() — both need to be updated together.
Problem / motivation
In
cmd/mcp/serve.go, the MCP server startup log messages hardcode the number of tools, resources, and prompts:These values silently become stale whenever tools, resources, or prompts are added or removed. This has likely already drifted from the actual count.
Proposed solution
Either:
mcp-golibrary exposes a way to query registered tools/resources/prompts from theMCPServerinstance.The counts appear in two places in
serve.go(once for stdio, once for http transport).Alternatives considered
Leave as-is — but this guarantees the log output will be wrong after the next tool addition, which undermines trust in the log messages.
Additional context
The hardcoded values appear on two separate log lines in
runServe()— both need to be updated together.