search_files_by_content

Search files by content in a repository

Server Mcp Gitee @gitee/mcp-gitee
Category Read
Risk class Low
Parameters 93 required

What search_files_by_content does on Mcp Gitee

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.

ParameterTypeRequiredDescription
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.

Why search_files_by_content needs a policy

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)

Questions about search_files_by_content

What does the search_files_by_content tool do? +

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.

What parameters does search_files_by_content accept? +

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.

How do I enforce a policy on search_files_by_content? +

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.

What risk level is search_files_by_content? +

search_files_by_content is a Read tool with low risk. Read-only tools are generally safe to allow by default.

Can I rate-limit search_files_by_content? +

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.

How do I block search_files_by_content completely? +

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.

What MCP server provides search_files_by_content? +

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.

// LOOK UP ANOTHER 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 →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.