-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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-golibrary exposes a way to query registered tools/resources/prompts from theMCPServerinstance. - 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request