On this page
Reference
ctx_git_read
Input contract and parameters for ctx_git_read.
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.
Parameters
Generated from the registered input schema. “Required” reflects the schema; individual actions can impose additional requirements.
max_tokensintegerToken budget (default: 6000)
modestringoverview|tree|read|grep
Accepted: overviewtreereadgrep
pathstringPath within repo
querystringSearch term for grep mode
refstringBranch/tag/commit (overrides URL ref)
timeout_secsintegerTimeout seconds (default: 90, max: 300)
urlstringRequiredhttps repo URL (blob/tree links auto-detect ref+path)
Exact JSON schema
Inspect the complete input schema
{
"properties": {
"max_tokens": {
"description": "Token budget (default: 6000)",
"type": "integer"
},
"mode": {
"description": "overview|tree|read|grep",
"enum": [
"overview",
"tree",
"read",
"grep"
],
"type": "string"
},
"path": {
"description": "Path within repo",
"type": "string"
},
"query": {
"description": "Search term for grep mode",
"type": "string"
},
"ref": {
"description": "Branch/tag/commit (overrides URL ref)",
"type": "string"
},
"timeout_secs": {
"description": "Timeout seconds (default: 90, max: 300)",
"type": "integer"
},
"url": {
"description": "https repo URL (blob/tree links auto-detect ref+path)",
"type": "string"
}
},
"required": [
"url"
],
"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
Read remote git repos via cached shallow clone (not HTML scraping).
modes: overview (tree + README) | tree (file list) | read (file content) | grep (search).
Accepts repo URLs and GitHub/GitLab blob/tree links (ref+path auto-detected).
https-only, SSRF-guarded. Prefer over ctx_url_read for whole-repo access.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