Gate Compress File
gate_compress_fileCompress code, YAML, and Markdown files into AST signatures or structural summaries to reduce token usage before sending content to an LLM.
Instructions
AST/structure file compression. Code: signature. YAML/MD: auto structure. See gate_help recommended_stack.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filePath": "<filePath>"
},
"name": "gate_compress_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | signature (AST, default), structure (YAML/MD keys), summary (code only), full (raw) | signature |
| filePath | Yes | Absolute or relative path to the code file | |
| projectRoot | No | Optional project root (narrows GATE_PROJECT_ROOT; cannot widen). Use for multi-repo workspaces. |