audit_context_health
Audit raw logs, code, or prompts for token bloat, framework noise, and credential leaks. Get a health grade, savings estimate, and actionable recommendations without modifying your workspace.
Instructions
Audits a raw error log, code snippet, or prompt payload for token bloat, framework noise, and credential leaks. Returns actionable M2M telemetry and savings recommendations without mutating workspace state.
• Side Effects: None. Read-only in-memory evaluation. • Auth & Permissions: None. • Rate Limits: None. • Return Shape: Returns JSON with 'raw_characters', 'estimated_raw_tokens', 'clean_characters', 'estimated_clean_tokens', 'tokens_saved', 'noise_reduction_pct', 'secrets_detected', 'health_grade' ('OPTIMAL', 'MODERATE_BLOAT', 'CRITICAL_BLOAT'), and 'recommendation'. • When to use: Call proactively when dealing with large terminal dumps or before sending long logs to the LLM to verify context efficiency. • When NOT to use: Do NOT use to apply file edits (use apply_code_patch) or query stack overflow.
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": {
"payload": "<payload>"
},
"name": "audit_context_health"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payload | Yes | Raw string, stack trace, or prompt payload to audit for token bloat and credentials. |