AI agents call search_files_by_content to retrieve information from Mcp Gitee without modifying anything — typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
ref | string | — | Branch, tag, or commit to search; defaults to the repository's default branch |
repo | string | Yes | The path of the repository |
limit | number | — | Maximum number of search results to return (1-100) |
owner | string | Yes | The space address to which the repository belongs (the address path of the enterprise, organization or individual) |
paths | string | — | Comma-separated list of paths or glob patterns to limit the search scope |
query | string | Yes | The search keywords |
after_context | number | — | Number of context lines to include after each match |
before_context | number | — | Number of context lines to include before each match |
literal_pathspec | boolean | — | Treat provided paths as literal strings and disable glob matching |
Parameters from the server's own tool schema.
This tool queries and retrieves file content from a repository without creating, modifying, or deleting any data. It has no side effects beyond reading. The low severity reflects minimal risk even if an AI agent uses it to search arbitrary content—the worst outcome would be exposing already-accessible file contents.
From the tool's definition Tool name 'search_files_by_content' and description 'Search files by content in a repository' indicate a retrieval-only operation. No modification, deletion, or execution is implied.
Risk signalsAccepts freeform code/query input (query)
Attacks that exploit this kind of access
Search files by content in a repository. It is categorised as a Read tool in the Mcp Gitee MCP Server, which means it retrieves data without modifying state.
search_files_by_content accepts 9 parameters: ref, repo, limit, owner, paths, query, after_context, before_context, literal_pathspec. Required: repo, owner, query. The full parameter table on this page comes from the server's own tool schema.
Register the Mcp Gitee MCP server in PolicyLayer and add a rule for search_files_by_content: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Mcp Gitee. Nothing to install.
search_files_by_content is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the search_files_by_content rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for search_files_by_content. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
search_files_by_content is provided by the Mcp Gitee MCP server (@gitee/mcp-gitee). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Every MCP server has a record like this.
Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.
Teams ship this data inside their own products. See what a licence covers →