AST context pruner, token budget planner, fuzzy patcher, and code solvers.
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
Static lexer and AST parser only (zero execution or evaluation): extracts imports, exports, classes, interfaces, and functions with line numbers, intra-file call edges, McCabe cyclomatic complexity, and Halstead volume across TypeScript, Python, Rust, Go, and Move. Use when mapping internal functions, call graphs, and complexity hotspots of a source file before refactoring; for analyzing cross-file import DAGs and circular dependencies, use audit_module_dependency_cycles instead. Read-only call (32 KB, 60 RPM): accepts 'source_text' (with enum defaults), uses '?demo=true' or L402 (20 sats); HTTP 400 if invalid.
Source code file content to parse for symbols and complexity metrics.
Programming language grammar used for symbol extraction; defaults to 'typescript' when omitted.
Alias for code: source code file content to parse.
Pick your client. Values in capitals, like YOUR_TOKEN, are yours to fill in.
Run in a terminal
claude mcp add --transport http diogenes-context-code-solver-mcp https://diogenesgateway.com/mcp/context-code-solver
Static lexer and AST parser only (zero execution or evaluation): extracts imports, exports, classes, interfaces, and functions with line numbers, intra-file call edges, McCabe cyclomatic complexity, and Halstead volume across TypeScript, Python, Rust, Go, and Move. Use when mapping internal functions, call graphs, and complexity hotspots of a source file before refactoring; for analyzing cross-file import DAGs and circular dependencies, use audit_module_dependency_cycles instead. Read-only call (32 KB, 60 RPM): accepts 'source_text' (with enum defaults), uses '?demo=true' or L402 (20 sats); HTTP 400 if invalid.
| Argument | Type | Description |
|---|---|---|
| code* | string | Source code file content to parse for symbols and complexity metrics. |
| language | string | Programming language grammar used for symbol extraction; defaults to 'typescript' when omitted. |
| source_text | string | Alias for code: source code file content to parse. |
{
"type": "object",
"required": [
"code"
],
"properties": {
"code": {
"type": "string",
"description": "Source code file content to parse for symbols and complexity metrics."
},
"language": {
"enum": [
"typescript",
"python",
"rust",
"go",
"sui_move"
],
"type": "string",
"description": "Programming language grammar used for symbol extraction; defaults to 'typescript' when omitted."
},
"source_text": {
"type": "string",
"description": "Alias for code: source code file content to parse."
}
}
}Applies unified diffs (@@ ... @@) or SEARCH/REPLACE blocks to source code using sliding-window token similarity to resolve drifted line numbers, align indentation, and verify bracket balance. Use when healing and applying a code edit or diff that failed exact line matching due to line-number drift or whitespace differences; for inspecting function signatures, call trees, and cyclomatic complexity without modifying code, use analyze_ast_symbol_graph instead. Read-only call (32 KB, 60 RPM): accepts 'original_code' (with enum defaults), uses '?demo=true' or L402 (20 sats); HTTP 400 if invalid.
| Argument | Type | Description |
|---|---|---|
| patch* | string | Unified diff hunk or <<<<<<< SEARCH ... ======= ... >>>>>>> REPLACE block to apply. |
| fuzz_strategy | string | Line-matching tolerance and indentation behavior; defaults to 'whitespace_normalized_auto_indent' when omitted. |
| original_code* | string | Complete original source file content before patching. |
{
"type": "object",
"required": [
"original_code",
"patch"
],
"properties": {
"patch": {
"type": "string",
"description": "Unified diff hunk or <<<<<<< SEARCH ... ======= ... >>>>>>> REPLACE block to apply."
},
"fuzz_strategy": {
"enum": [
"whitespace_normalized_auto_indent",
"exact_line_match",
"aggressive_token_fuzzy"
],
"type": "string",
"description": "Line-matching tolerance and indentation behavior; defaults to 'whitespace_normalized_auto_indent' when omitted."
},
"original_code": {
"type": "string",
"description": "Complete original source file content before patching."
}
}
}Runs Tarjan's Strongly Connected Components (SCC) algorithm on a module import map to detect circular dependencies, compute parallel topological build waves, and trace downstream change blast radius. Use when auditing multi-file import graphs for circular cycles or determining which downstream files must be re-tested after an edit; for extracting function-level symbols and cyclomatic complexity inside a single source file, use analyze_ast_symbol_graph instead. Read-only call (32 KB, 60 RPM): accepts 'modules_json' (with enum defaults), uses '?demo=true' or L402 (20 sats); HTTP 400 if invalid.
| Argument | Type | Description |
|---|---|---|
| modules_json* | string | JSON string or object mapping each module name to its array of imported module names (e.g. '{"a":["b"],"b":[]}'). |
| analysis_scope | string | Graph analysis output mode; defaults to 'cycles_waves_and_blast_radius' when omitted. |
{
"type": "object",
"required": [
"modules_json"
],
"properties": {
"modules_json": {
"type": "string",
"description": "JSON string or object mapping each module name to its array of imported module names (e.g. '{\"a\":[\"b\"],\"b\":[]}')."
},
"analysis_scope": {
"enum": [
"cycles_waves_and_blast_radius",
"cycles_only",
"topological_waves_only"
],
"type": "string",
"description": "Graph analysis output mode; defaults to 'cycles_waves_and_blast_radius' when omitted."
}
}
}Inspects a sample JSON payload (inferring UUID, ISO-8601 datetime, email, integer vs float, and array item types) and compiles strict TypeScript interfaces, Zod schemas, Python Pydantic v2 models, and JSON Schema Draft 2020-12. Use when generating static type definitions and runtime validators in TypeScript and Python from a sample JSON response; for extracting existing function/class symbols and complexity metrics from source code, use analyze_ast_symbol_graph instead. Read-only call (32 KB, 60 RPM): accepts 'sample_json' (with enum defaults), uses '?demo=true' or L402 (20 sats); HTTP 400 if invalid.
| Argument | Type | Description |
|---|---|---|
| root_name | string | Identifier used for the generated root interface/class; defaults to 'GeneratedPayload' when omitted. |
| strictness | string | Schema additionalProperties and format constraint mode; defaults to 'strict_formats' when omitted. |
| sample_json* | string | JSON string or object representing the sample payload to infer types from. |
{
"type": "object",
"required": [
"sample_json"
],
"properties": {
"root_name": {
"type": "string",
"description": "Identifier used for the generated root interface/class; defaults to 'GeneratedPayload' when omitted."
},
"strictness": {
"enum": [
"strict_formats",
"passthrough_open",
"partial_optional"
],
"type": "string",
"description": "Schema additionalProperties and format constraint mode; defaults to 'strict_formats' when omitted."
},
"sample_json": {
"type": "string",
"description": "JSON string or object representing the sample payload to infer types from."
}
}
}Compares baseline and candidate OpenAPI 3.1 specs, JSON Schemas, or MCP tool manifests to detect breaking changes (removed fields, new required inputs, narrowed enums, type mutations). Use when auditing API, JSON Schema, or MCP contract revisions for backward compatibility before deployment; for compiling new TypeScript, Zod, and Pydantic schemas from a single sample JSON payload, use compile_polyglot_type_schemas instead. Read-only edge call (32 KB, 60 RPM): accepts 'baseline_schema_json' (with enum defaults), uses '?demo=true' or L402 (25 sats); HTTP 400 if invalid.
| Argument | Type | Description |
|---|---|---|
| contract_format | string | Contract specification format; defaults to 'auto_detect' when omitted. |
| baseline_schema_json* | string | JSON string of the baseline OpenAPI 3.1 spec, JSON Schema, or MCP tools array. |
| candidate_schema_json* | string | JSON string of the proposed candidate schema or contract revision to compare. |
{
"type": "object",
"required": [
"baseline_schema_json",
"candidate_schema_json"
],
"properties": {
"contract_format": {
"enum": [
"auto_detect",
"json_schema",
"openapi_3_1",
"mcp_tools_manifest"
],
"type": "string",
"description": "Contract specification format; defaults to 'auto_detect' when omitted."
},
"baseline_schema_json": {
"type": "string",
"description": "JSON string of the baseline OpenAPI 3.1 spec, JSON Schema, or MCP tools array."
},
"candidate_schema_json": {
"type": "string",
"description": "JSON string of the proposed candidate schema or contract revision to compare."
}
}
}Computes structural diffs between two agent state snapshots ('added_keys', 'mutated_keys', 'removed_keys'), flags boolean belief contradictions, generates an RFC 7396 JSON Merge Patch delta, and computes a canonical checkpoint hash. Use when checkpointing agent state or transmitting minimal RFC 7396 state deltas across multi-agent handoffs; for counting BPE tokens and auditing Lost-in-the-Middle prompt attention, use plan_context_token_budget instead. Read-only call (32 KB, 60 RPM): accepts 'previous_state_json' (with enum defaults), uses '?demo=true' or L402 (10 sats); HTTP 400 if invalid.
| Argument | Type | Description |
|---|---|---|
| conflict_strategy | string | Resolution policy when keys conflict; defaults to 'prefer_current' when omitted. |
| current_state_json* | string | JSON string or object representing the updated agent state snapshot. |
| previous_state_json* | string | JSON string or object representing the prior agent state snapshot. |
{
"type": "object",
"required": [
"previous_state_json",
"current_state_json"
],
"properties": {
"conflict_strategy": {
"enum": [
"prefer_current",
"prefer_previous",
"flag_only"
],
"type": "string",
"description": "Resolution policy when keys conflict; defaults to 'prefer_current' when omitted."
},
"current_state_json": {
"type": "string",
"description": "JSON string or object representing the updated agent state snapshot."
},
"previous_state_json": {
"type": "string",
"description": "JSON string or object representing the prior agent state snapshot."
}
}
}Computes Welch's two-sample t-test or two-proportion z-test, returning two-tailed p-values, Cohen's d effect size, relative lift %, and Bayesian P(Treatment > Control). Use when determining whether a prompt change, model benchmark, or A/B experiment produced a statistically significant improvement; for evaluating single algebraic formulas or NPV/IRR cashflows, use evaluate_deterministic_math instead. Read-only edge call (32 KB, 60 RPM): accepts 'control_json' ('treatment_json' defaults to 'standard'), supports '?demo=true' or L402 (15 sats), and returns HTTP 400 if invalid.
| Argument | Type | Description |
|---|---|---|
| control_json* | string | JSON string or object for the baseline control arm (e.g. '{"conversions":142,"total":1000}' or '{"samples":[12,15,14]}'). |
| treatment_json* | string | JSON string or object for the candidate treatment arm (e.g. '{"conversions":186,"total":1000}'). |
| significance_level | string | Type-I error alpha threshold for statistical significance; defaults to 'alpha_0_05' when omitted. |
{
"type": "object",
"required": [
"control_json",
"treatment_json"
],
"properties": {
"control_json": {
"type": "string",
"description": "JSON string or object for the baseline control arm (e.g. '{\"conversions\":142,\"total\":1000}' or '{\"samples\":[12,15,14]}')."
},
"treatment_json": {
"type": "string",
"description": "JSON string or object for the candidate treatment arm (e.g. '{\"conversions\":186,\"total\":1000}')."
},
"significance_level": {
"enum": [
"alpha_0_01",
"alpha_0_05",
"alpha_0_10"
],
"type": "string",
"description": "Type-I error alpha threshold for statistical significance; defaults to 'alpha_0_05' when omitted."
}
}
}Strict Shunting-Yard AST arithmetic parser with zero eval() or dynamic code execution: evaluates algebraic formulas and computes exact financial NPV, Newton-Raphson IRR, Kelly criterion, and dataset stats. Use when computing exact arithmetic formulas, cashflow NPV/IRR, or descriptive statistics without LLM floating-point guesswork; for running two-sample A/B hypothesis tests, use evaluate_ab_statistical_significance instead. Read-only edge call (32 KB, 60 RPM): accepts 'math_formula' ('precision_digits' defaults to '2_decimals'), uses '?demo=true' or L402 (10 sats); HTTP 400 if invalid.
| Argument | Type | Description |
|---|---|---|
| expression* | string | Algebraic or scientific formula to evaluate (e.g. '(125000 * (1 + 0.0725/12)^60) - 98450.50'). |
| math_formula | string | Alias for expression: algebraic formula to evaluate. |
| precision_digits | string | Decimal rounding precision for returned numbers; defaults to '8_decimals' when omitted. |
{
"type": "object",
"required": [
"expression"
],
"properties": {
"expression": {
"type": "string",
"description": "Algebraic or scientific formula to evaluate (e.g. '(125000 * (1 + 0.0725/12)^60) - 98450.50')."
},
"math_formula": {
"type": "string",
"description": "Alias for expression: algebraic formula to evaluate."
},
"precision_digits": {
"enum": [
"2_decimals",
"4_decimals",
"8_decimals"
],
"type": "string",
"description": "Decimal rounding precision for returned numbers; defaults to '8_decimals' when omitted."
}
}
}Synthesizes deterministic unit-test vectors from a JSON Schema or function signature covering valid equivalence partitions, numeric/length boundaries, and adversarial Unicode/null inputs. Use when generating exhaustive edge-case unit test payloads and fuzz vectors for an API endpoint or function; for healing and applying unified diffs or search/replace edits to source code, use apply_fuzzy_code_patch instead. Read-only edge call (32 KB, 60 RPM): accepts 'schema_or_signature_json' (with enum defaults), uses '?demo=true' or L402 (20 sats); HTTP 400 if invalid.
| Argument | Type | Description |
|---|---|---|
| vector_suite_profile | string | Test generation coverage profile; defaults to 'equivalence_boundary_and_fuzz' when omitted. |
| schema_or_signature_json* | string | JSON Schema object or function parameter specification to generate test vectors for. |
{
"type": "object",
"required": [
"schema_or_signature_json"
],
"properties": {
"vector_suite_profile": {
"enum": [
"equivalence_boundary_and_fuzz",
"boundary_values_only",
"adversarial_security_fuzz"
],
"type": "string",
"description": "Test generation coverage profile; defaults to 'equivalence_boundary_and_fuzz' when omitted."
},
"schema_or_signature_json": {
"type": "string",
"description": "JSON Schema object or function parameter specification to generate test vectors for."
}
}
}Parses noisy CI/terminal logs and multi-language stack traces (Node/TS, Python, Rust, Go), strips node_modules/stdlib frames to isolate the innermost failing user-code frame, and clusters repetitive logs into Drain templates. Use when triage-debugging test failures, crash dumps, or repetitive server error logs; for compressing general source code files or prose transcripts, use prune_context_skeleton instead. Read-only edge call (32 KB, 60 RPM): accepts 'raw_log' ('runtime_hint' defaults to 'auto_detect'), supports '?demo=true' or L402 (15 sats), and returns HTTP 400 if invalid.
| Argument | Type | Description |
|---|---|---|
| raw_log* | string | Raw terminal output, CI failure log, or exception traceback to analyze. |
| runtime_hint | string | Runtime stack format hint; defaults to 'auto_detect' when omitted. |
{
"type": "object",
"required": [
"raw_log"
],
"properties": {
"raw_log": {
"type": "string",
"description": "Raw terminal output, CI failure log, or exception traceback to analyze."
},
"runtime_hint": {
"enum": [
"auto_detect",
"nodejs_v8",
"python_traceback",
"rust_panic",
"go_goroutine"
],
"type": "string",
"description": "Runtime stack format hint; defaults to 'auto_detect' when omitted."
}
}
}Counts subword BPE tokens across prompt segments, detects high-priority instructions trapped in the 35%–72% Lost-in-the-Middle attention trough, and calculates USD/satoshi costs across frontier LLMs. Use when auditing prompt token budgets, reordering prompt sections for primacy/recency attention, or comparing model API costs; for actively compressing and stripping low-salience lines from a single large file, use prune_context_skeleton instead. Read-only edge call (32 KB, 60 RPM): accepts 'segments_json' (with enum defaults), uses '?demo=true' or L402 (10 sats); HTTP 400 if invalid.
| Argument | Type | Description |
|---|---|---|
| segments_json* | string | JSON string or array of prompt segments '[{"name":"sys","text":"...","priority":10}]' to analyze. |
| max_context_tokens | number | Target model context window limit in tokens; defaults to 128000 when omitted. |
| target_model_family | string | Primary model family for token-Window calibration; defaults to 'gemini_3_1' when omitted. |
{
"type": "object",
"required": [
"segments_json"
],
"properties": {
"segments_json": {
"type": "string",
"description": "JSON string or array of prompt segments '[{\"name\":\"sys\",\"text\":\"...\",\"priority\":10}]' to analyze."
},
"max_context_tokens": {
"type": "number",
"description": "Target model context window limit in tokens; defaults to 128000 when omitted."
},
"target_model_family": {
"enum": [
"gemini_3_1",
"claude_4_5",
"gpt_5",
"deepseek_r1"
],
"type": "string",
"description": "Primary model family for token-Window calibration; defaults to 'gemini_3_1' when omitted."
}
}
}Compresses large source files, logs, or transcripts by 50–80% to fit an LLM context budget while preserving 100% of function/class/type signatures, imports, error frames, and query-matched lines. Use when shrinking oversized source files or logs before feeding them into an LLM prompt; for counting BPE tokens across prompt segments and calculating multi-model inference costs without altering text, use plan_context_token_budget instead. Read-only edge call (32 KB, 60 RPM): accepts 'content' (with enum defaults), uses '?demo=true' or L402 (10 sats); HTTP 400 if invalid.
| Argument | Type | Description |
|---|---|---|
| content* | string | Raw source code, document, or multi-turn transcript to compress. |
| focus_query | string | Optional symbol or keyword query whose matching lines receive maximum retention priority. |
| pruning_mode | string | Salience weighting preset; defaults to 'ast_signatures_first' when omitted. |
| target_ratio | number | Target token retention ratio between 0.15 and 0.85; defaults to 0.45 when omitted. |
{
"type": "object",
"required": [
"content"
],
"properties": {
"content": {
"type": "string",
"description": "Raw source code, document, or multi-turn transcript to compress."
},
"focus_query": {
"type": "string",
"description": "Optional symbol or keyword query whose matching lines receive maximum retention priority."
},
"pruning_mode": {
"enum": [
"ast_signatures_first",
"errors_and_stackframes",
"prose_headings_first"
],
"type": "string",
"description": "Salience weighting preset; defaults to 'ast_signatures_first' when omitted."
},
"target_ratio": {
"type": "number",
"description": "Target token retention ratio between 0.15 and 0.85; defaults to 0.45 when omitted."
}
}
}Reranks and deduplicates candidate RAG or retrieval passages against a search prompt using Okapi BM25 (k1=1.5, b=0.75), Reciprocal Rank Fusion (RRF), and Maximal Marginal Relevance (MMR) Jaccard diversity filtering. Use when selecting the top-K highest-signal, non-redundant passages from vector search or grep results; for compressing a single contiguous source file while keeping its original line order, use prune_context_skeleton instead. Read-only edge call (32 KB, 60 RPM): accepts 'search_prompt' ('documents_json' defaults to 'standard'), uses '?demo=true' or L402 (15 sats); HTTP 400 if invalid.
| Argument | Type | Description |
|---|---|---|
| top_k | number | Maximum number of deduplicated chunks to return; defaults to 5 when omitted. |
| ranking_mode | string | Fusion weighting between lexical BM25 and diversity penalty; defaults to 'bm25_rrf_mmr' when omitted. |
| search_prompt* | string | Technical search prompt or question used to score candidate chunks. |
| documents_json* | string | JSON string or array of candidate chunks '[{"id":"c1","text":"..."}]' to rerank. |
{
"type": "object",
"required": [
"search_prompt",
"documents_json"
],
"properties": {
"top_k": {
"type": "number",
"description": "Maximum number of deduplicated chunks to return; defaults to 5 when omitted."
},
"ranking_mode": {
"enum": [
"bm25_rrf_mmr",
"pure_bm25_lexical",
"high_diversity_mmr"
],
"type": "string",
"description": "Fusion weighting between lexical BM25 and diversity penalty; defaults to 'bm25_rrf_mmr' when omitted."
},
"search_prompt": {
"type": "string",
"description": "Technical search prompt or question used to score candidate chunks."
},
"documents_json": {
"type": "string",
"description": "JSON string or array of candidate chunks '[{\"id\":\"c1\",\"text\":\"...\"}]' to rerank."
}
}
}Solves a task dependency DAG via the Critical Path Method (CPM) to compute ES/EF/LS/LF, Total Float/Slack, optimal makespan, and the Critical Path. Use when scheduling dependent engineering milestones or workflow steps to find the minimum project duration and zero-slack bottleneck path; for detecting circular code imports and file blast radius without task durations, use audit_module_dependency_cycles instead. Read-only edge call (32 KB, 60 RPM): accepts 'tasks_json' ('time_unit' defaults to 'minutes'), supports '?demo=true' or L402 (20 sats), and returns HTTP 400 if invalid.
| Argument | Type | Description |
|---|---|---|
| time_unit | string | Duration unit label attached to the schedule; defaults to 'hours' when omitted. |
| tasks_json* | string | JSON string or array of tasks '[{"id":"t1","duration":3,"dependencies":[]}]' to schedule. |
{
"type": "object",
"required": [
"tasks_json"
],
"properties": {
"time_unit": {
"enum": [
"minutes",
"hours",
"days",
"sprints"
],
"type": "string",
"description": "Duration unit label attached to the schedule; defaults to 'hours' when omitted."
},
"tasks_json": {
"type": "string",
"description": "JSON string or array of tasks '[{\"id\":\"t1\",\"duration\":3,\"dependencies\":[]}]' to schedule."
}
}
}Runs a reproducible seeded Mulberry32 Monte Carlo simulation over uncertain cost, latency, or duration variables to compute P10/P50/P90/P95 percentiles, Value-at-Risk (VaR), and CVaR. Use when modeling stochastic uncertainty, tail risk (VaR/CVaR), and probability of meeting a budget or SLA target; for evaluating deterministic single-point algebraic formulas or exact NPV/IRR cashflows, use evaluate_deterministic_math instead. Read-only edge call (32 KB, 60 RPM): accepts 'variables_json' (with enum defaults), uses '?demo=true' or L402 (20 sats); HTTP 400 if invalid.
| Argument | Type | Description |
|---|---|---|
| variables_json* | string | JSON array of stochastic variables (e.g. name, min, mode, max) to simulate. |
| distribution_model | string | Probability distribution family applied to each variable; defaults to 'triangular_pert' when omitted. |
{
"type": "object",
"required": [
"variables_json"
],
"properties": {
"variables_json": {
"type": "string",
"description": "JSON array of stochastic variables (e.g. name, min, mode, max) to simulate."
},
"distribution_model": {
"enum": [
"triangular_pert",
"normal_gaussian",
"uniform_range"
],
"type": "string",
"description": "Probability distribution family applied to each variable; defaults to 'triangular_pert' when omitted."
}
}
}We read every tool's name, description and inputs the way the model will, looking for instructions hidden from you. A clean result means no warning signs, not a guarantee. Scanned Nov 24, 2026.