On this page
Reference
ctx_search
Input contract and parameters for ctx_search.
MCP tool · Read, search & shell
Call this tool through your MCP client. Its availability depends on your active configuration and profile.
This registry contract is separate from the SDK. For terminal commands, use the CLI reference.
Example call
JSON for an MCP client. Replace example paths and queries with your own project values.
{
"name": "ctx_search",
"arguments": {
"action": "regex",
"path": ".",
"pattern": "authenticate",
"max_results": 12
}
}Parameters
Generated from the registered input schema. “Required” reflects the schema; individual actions can impose additional requirements.
actionstringAccepted: regexsemanticsymbolfind_related
anchoredbooleanexcludestringexclude_patternstringfilestringfile_pathstringhandlestringincludestringGlob, e.g. *.rs
kindstringlineintegermax_resultsintegershared across queries
modestringAccepted: bm25densehybrid
namestringpathstringpathsarraypatternstringqueriesarrayquerystringtop_kintegerExact JSON schema
Inspect the complete input schema
{
"properties": {
"action": {
"enum": [
"regex",
"semantic",
"symbol",
"find_related"
],
"type": "string"
},
"anchored": {
"type": "boolean"
},
"exclude": {
"type": "string"
},
"exclude_pattern": {
"type": "string"
},
"file": {
"type": "string"
},
"file_path": {
"type": "string"
},
"handle": {
"type": "string"
},
"include": {
"description": "Glob, e.g. *.rs",
"type": "string"
},
"kind": {
"type": "string"
},
"line": {
"type": "integer"
},
"max_results": {
"description": "shared across queries",
"type": "integer"
},
"mode": {
"enum": [
"bm25",
"dense",
"hybrid"
],
"type": "string"
},
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"paths": {
"items": {
"type": "string"
},
"type": "array"
},
"pattern": {
"type": "string"
},
"queries": {
"items": {
"type": "object"
},
"type": "array"
},
"query": {
"type": "string"
},
"top_k": {
"type": "integer"
}
},
"required": [],
"type": "object"
}Runtime description
The following is the tool's own agent-facing description, reproduced from the reviewed registry. It can contain implementation terminology; it does not expand the public stability commitment.
Read the agent-facing description
Search code: regex(pattern, default) | semantic(query) | symbol(name|handle) | find_related(file_path,line). Read-only. anchored=true enables ctx_patch refs; queries batches regex searches. Run ctx_compose FIRST.Sources & versions
- mcp_manifest.rsrust/src/core/mcp_manifest.rsReviewed checkout
- registry.rsrust/src/server/registry.rsReviewed checkout
- dynamic_tools.rsrust/src/server/dynamic_tools.rsReviewed checkout
- Core checkout
50fbff09c9- Installed runtime
- 3.10.2
- SDK release
- 1.1.0
Separate baselines for source, CLI/configuration and SDK contracts. Review does not certify every platform or integration.
Versions & compatibility