Several tools accept open string parameters that the Gitea API only honors for a fixed enum (sort, order, state, type, etc.) — e.g. operation/search/search.go for SearchReposTool. Invalid values are passed through verbatim; Gitea silently ignores them, producing surprising results without any error surfaced to the MCP client.
Suggested direction
Use mcp.Enum(...) in the tool schema where the value set is known
For values that depend on context, validate post-extraction with an allowlist and return a descriptive MCP error
Document the allowed values in the tool description so MCP clients can prompt correctly
## Problem
Several tools accept open string parameters that the Gitea API only honors for a fixed enum (`sort`, `order`, `state`, `type`, etc.) — e.g. `operation/search/search.go` for `SearchReposTool`. Invalid values are passed through verbatim; Gitea silently ignores them, producing surprising results without any error surfaced to the MCP client.
## Suggested direction
- Use `mcp.Enum(...)` in the tool schema where the value set is known
- For values that depend on context, validate post-extraction with an allowlist and return a descriptive MCP error
- Document the allowed values in the tool description so MCP clients can prompt correctly
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
Several tools accept open string parameters that the Gitea API only honors for a fixed enum (
sort,order,state,type, etc.) — e.g.operation/search/search.goforSearchReposTool. Invalid values are passed through verbatim; Gitea silently ignores them, producing surprising results without any error surfaced to the MCP client.Suggested direction
mcp.Enum(...)in the tool schema where the value set is known