codecalc
PYPI · CODECALC · SCANNED SEP 21
Code & logic calculator for AI agents: 31 languages, symbolic math, SMT/logic solving, Big-O.
Available components
How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. How we score → Why this is hard to score →
Supply Chain Security87
- No malware found by supply-chain analysis.Pass
- No known CVEs affecting this package version or its production dependencies.Pass
- Install-script risk not yet assessed.Unverified
- 1 of 29 dependencies flagged as unhealthy. View diagnostics → Partial
Provenance & Transparency35
- Source repository is publicly reachable at the declared URL. View diagnostics → Pass
- Provenance check failed: no build-provenance attestation is published. See how to fix → View diagnostics → Fail
- License check failed: no license is declared. See how to fix → Fail
- Actively maintained (last published 11 days ago).Pass
- Publishes a security disclosure policy (SECURITY.md).Pass
Schema Quality & AI Usability79
- 100% of prompts and resources have a non-trivial description (not blank, and not just the item's name).Pass
- AI-judged instruction clarity (excellent).Pass
- Context-footprint check failed: tool/resource definitions use about 12134 tokens (~237/item across 51 items; 49 tools + 2 resources), over budget; trim descriptions and params. See how to fix → Fail
- Usage-examples check failed: none of the tools include examples. See how to fix → Fail
Stability & Change Management85
- Stability check failed: the tool surface changed between 0.5.0 and 0.12.0: 8 tool removals, 0 breaking changes, 5 additions. See how to fix → Fail
Tool Coverage100
- 100% of tools have a non-trivial description (not blank, and not just the tool's name).Pass
- 100% of tool parameters carry a description.Pass
- Structured output schemas are declared (96% of tools); any adoption earns full credit.Pass
Tool Safety100
- No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.Pass
- All 2 tool(s) whose name or description implies an irreversible operation declare an MCP destructiveHint annotation.Pass
- An AI judge read all 51 captured unit(s) of tool text and found none that tries to manipulate the model reading it.Pass
Capabilities100
- Implements a current MCP spec version (2026-07-28).Pass
- Supports UI / widget rendering.Pass
How do I install the codecalc MCP server?
codecalc runs locally as a PyPI package, launched with uvx codecalc. Ready-made configuration for Claude, Cursor, VS Code, Codex and 5 more is on this page, copied from each client's own documentation.
pypi · codecalc
claude mcp add the-40-thieves-codecalc -- uvx codecalc
{
"mcpServers": {
"the-40-thieves-codecalc": {
"command": "uvx",
"args": [
"codecalc"
]
}
}
} {
"servers": {
"the-40-thieves-codecalc": {
"command": "uvx",
"args": [
"codecalc"
]
}
}
} codex mcp add the-40-thieves-codecalc -- uvx codecalc
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"the-40-thieves-codecalc": {
"type": "local",
"command": [
"uvx",
"codecalc"
],
"enabled": true
}
}
} openclaw mcp add the-40-thieves-codecalc --command uvx --arg codecalc
mcp_servers:
the-40-thieves-codecalc:
command: "uvx"
args: ["codecalc"] {
"McpServers": {
"the-40-thieves-codecalc": {
"Transport": "stdio",
"Command": "uvx",
"Arguments": [
"codecalc"
]
}
}
} assistant mcp add the-40-thieves-codecalc -t stdio -c uvx -a codecalc
{
"mcpServers": {
"the-40-thieves-codecalc": {
"command": "uvx",
"args": [
"codecalc"
]
}
}
} Every change we have recorded for this component, newest first. Security-relevant changes are always shown. ▲ marks a change for the better, ▼ a change for the worse; unmarked changes are neutral.
- 18 Sept 26 +1
No change was recorded against any check on this day. Stability & Change Management went from 78 to 81.
- 16 Sept 26 +1
No change was recorded against any check on this day. Stability & Change Management went from 71 to 74.
- 14 Sept 26 +1
No change was recorded against any check on this day. Stability & Change Management went from 64 to 68.
- 12 Sept 26 +1
No change was recorded against any check on this day. Stability & Change Management went from 58 to 61.
- 10 Sept 26 +1
No change was recorded against any check on this day. Stability & Change Management went from 51 to 54.
- 9 Sept 26 +18
- Tool safety: pass → unverified ▼ security
- Stability: 0.63 → unverified ▼ security
- Stability: 0.63 → fail ▼ security
- Malware scan: unverified → pass ▲ security
- Schema quality: 155 → 237 ▼ functional
- Schema quality: 155 → 184 ▼ functional
- Capabilities: pass → unverified ▼ functional
- Tool coverage: 100 → unverified ▼ functional
- Tool coverage: 0% → 100% ▲ functional
- First check of Capabilities: pass functional
- First check of Schema quality: 100 functional
- First check of Schema quality: unverified functional
- Schema quality: good → excellent functional
- Package version: 0.10.0 → 0.12.0 functional
- Package version: 0.10.0 → 0.11.0 functional
- 8 Sept 26 0
- Package version: 0.8.0 → 0.10.0 functional
- Package version: 0.8.0 → 0.9.0 functional
- 7 Sept 26 −14
- Tool safety: pass → unverified ▼ security
- Stability: 0.57 → unverified ▼ security
- Malware scan: pass → unverified ▼ security
- Schema quality: 120 → 155 ▼ functional
- Schema quality: 120 → 144 ▼ functional
- Capabilities: pass → unverified ▼ functional
- Tool coverage: 100 → unverified ▼ functional
- Tool coverage: 4% → 96% ▲ functional
- First check of Schema quality: unverified functional
- Destructive annotations: All 2 tool(s) whose name or description implies an irreversible operation declare an MCP destructiveHint annotation. functional
- Package version: 0.5.0 → 0.8.0 functional
- Package version: 0.5.0 → 0.7.0 functional
- Package version: 0.5.0 → 0.6.0 functional
Diagnostic detail from the automated scan of this channel: what the scanner observed at each step, so you can see exactly where a check passed or failed. It is informational only and never changes the trust score.
Captured 21 Sept 2026 · Analysed pypi/codecalc@0.12.0
Provenance No attestation
The registry publishes no build provenance for this version, so there is nothing to verify.
| Result | No attestation |
|---|---|
| Ecosystem | pypi |
Background: How many MCP packages publish verified provenance →
Dependencies 29 packages
| Packages resolved | 29 |
|---|---|
| No linked repository | 1 |
| Tree resolution | Complete |
Background: SBOMs and build attestations, explained →
The tools this component advertises to a client, with an estimated token cost for each. Expand a tool to see its parameters and schema. The per-tool counts are indicative and are not scored directly; the schema's total context footprint is one signal in Schema Quality & AI Usability. A tool's description is untrusted text the model reads on every call, which is what makes this list a security surface and not just an inventory: how tool poisoning works →
algebraic_equiv Algebraic Equiv ~133
Are two expressions algebraically identical? 'is (a*b)/c the same as a*(b/c)?' answered exactly. Use symbolic(op="simplify"), not this, to see one expression's own simplified/factored/expanded forms rather than compare two; use verify_translation to compare running PROGRAMS, not expressions. Caveat: symbolic identity says nothing about float rounding, integer truncation or modular overflow.
| Name | Type | Req | Description |
|---|---|---|---|
| a | string | yes | First symbolic expression to compare for algebraic identity |
| b | string | yes | Second symbolic expression to compare for algebraic identity |
Structured output declared, but exposes no named fields.
No examples provided.
analyze_complexity Analyze Complexity ~68
Estimate the asymptotic (Big-O) time complexity of a code snippet via structural analysis.
| Name | Type | Req | Description |
|---|---|---|---|
| code | string | yes | Source code snippet to analyze structurally for its asymptotic time complexity |
| language | string | – | Language `code` is written in; default 'python3' |
Structured output declared, but exposes no named fields.
No examples provided.
benchmark Benchmark ~210
Empirically measure time complexity by running code at increasing input sizes. Contract: the code must read an integer N from stdin (first line) and do work sized by N. codecalc runs it at each size in `sizes` and fits the growth curve to estimate Big-O (O(1), O(log n), O(n), O(n log n), O(n^2)...). Example python: 'import sys\nn=int(sys.stdin.readline()); s=0\nfor i in range(n): s+=i\nprint(s)'
| Name | Type | Req | Description |
|---|---|---|---|
| code | string | yes | Program that reads integer N from stdin's first line and does work sized by N |
| language | string | – | Language `code` is written in; default 'python3' |
| sizes | string | – | Comma-separated input sizes to run at, e.g. '100,1000,10000,100000' |
| timeout | integer | – | Wall-clock seconds allowed per size before that run is killed |
Structured output declared, but exposes no named fields.
No examples provided.
bits Bits ~613
Programmer-mode integer facts and operations, selected by `mode` — replaces the four former standalone tools bit_analysis, bitop, int_widths and base_repr, retired in 0.12.0 (CHANGELOG.md). Every mode returns exactly its former tool's own result, plus `mode` (additive). mode="analysis" (was bit_analysis) — facts about a single N: popcount, bit length, trailing zeros, power-of-two check, next power of two. Used by this mode: `n` (required), `align` (optional). mode="op" (was bitop) — combine two integers `a`/`b` with and/or/xor/nand/nor/xnor/not/shl/shr/sar/rol/ror at a fixed `width` (8/16/32/64). Every result shows unsigned, signed (two's complement), hex, octal and binary. shr is logical (zero-fill); sar is arithmetic (sign-propagating) — 0x80 shr 1 = 0x40 (+64) but 0x80 sar 1 = 0xC0 (-64); rol/ror rotate bits around the width instead of shifting them out. A left shift that drops bits says OVERFLOW and shows the unbounded answer. Used by this mode: `a`, `op` (required), `b` (required unless op="not"), `width` (optional). mode="widths" (was int_widths) — which widths (i8..i64/u8..u64) hold `n`, and the wrapped value where they do not; flags anything past 2^53 as unable to round-trip through a JS number or JSON float. Used by this mode: `n` (required). mode="repr" (was base_repr) — hex/oct/bin of `n`; with `width`, two's complement and signed-overflow detection. Used by this mode: `n` (required), `width` (optional).
| Name | Type | Req | Description |
|---|---|---|---|
| a | – | – | First operand for mode='op'; required by that mode |
| align | – | – | Alignment boundary for mode='analysis'; reports padding needed to reach it |
| b | – | – | Second operand for mode='op'; required unless op='not' |
| mode | string | yes | Which fact/operation to compute: 'analysis', 'op', 'widths', or 'repr' (each has its own required params) |
| n | – | – | The integer to inspect; required by modes 'analysis', 'widths', and 'repr' |
| op | – | – | Bit operation for mode='op': and/or/xor/nand/nor/xnor/not/shl/shr/sar/rol/ror |
| width | – | – | Bit width for mode='op' (8/16/32/64, default 64) or mode='repr' (omit to skip width analysis) |
Structured output declared, but exposes no named fields.
No examples provided.
branch_reachability Branch Reachability ~421
Which if/elif/else arms and while/for loops of this python3 function can ever run, which are dead code, and what inputs reach each — decided with z3, without running the program. Use trace_execution instead to see what happened on one run. Use z3_check, not this, when you already have an SMT-LIB2 script to solve directly rather than Python source to translate. Unannotated parameters default to int. Each branch reports `verdict` (reachable/dead/unknown), a `witness` when reachable, and `boundary_inputs` (min/max/equality-edge for each comparison in its own guard) — every input dict is shaped to drop straight into compare_edge_cases's `test_inputs`. Refuses, naming the construct and line, prior to any z3 call: floats, attribute access, comprehensions, try/except, imports, data-dependent loop bounds, and anything else outside `+ - * // %`, `and/or/not`, `== != < <= > >=`, and `abs/min/max/len` on int/bool/str. A `for` loop of at most 32 iterations is unrolled exactly; a longer `for`, or a `while`, is checked one iteration at a time — a branch can still come back reachable there, but never `dead`, and anything past the loop that depends on what it computed comes back `unknown` rather than a guess.
| Name | Type | Req | Description |
|---|---|---|---|
| code | string | yes | Python3 function source to analyze for reachable/dead branches |
| inputs | – | – | Parameter name -> 'int'/'bool'/'str', to narrow or override an unannotated parameter's inferred type |
| language | string | yes | Source language of `code`; only python3 functions are analyzed |
| max_branches | integer | – | Max branches to analyze before stopping; default 64 |
| timeout | integer | – | Wall-clock seconds before the z3 solver call is abandoned |
Structured output declared, but exposes no named fields.
No examples provided.
calc_exact Calc Exact ~220
Use calc_exact, not evaluate_expression, for a literal arithmetic expression with no symbols in it. EXACT arithmetic: 0.1 + 0.2 == 0.3 is True here (False in plain Python). Everything is an exact rational, integers are arbitrary precision. Supports + - * / // % ** comparisons, bitwise ops (& | ^ << >> ~) on integers, and whitelisted math functions (sqrt, log, sin, ...) plus pi/e/tau. Use BEFORE asserting any computed number: thresholds, ratios, overflows, 'X is N% of Y'. Examples: '2**64 - 1', 'comb(52,5)', '0.1+0.2 == 0.3', '0xff & 0x0f'.
| Name | Type | Req | Description |
|---|---|---|---|
| expr | string | yes | Literal arithmetic expression with no symbols, e.g. '2**64 - 1', 'comb(52,5)', '0.1+0.2 == 0.3' |
Structured output declared, but exposes no named fields.
No examples provided.
calc_stats Calc Stats ~131
Mean, median, sample stdev, and coefficient of variation (CV) for a sample of numbers. Pairs with percentiles for distribution shape (p50/p90/p95/p99) on the same sample, and with benchmark or verify_optimization, which are common sources of the timing samples this tool summarizes. CV > 0.2 flags run-to-run noise that swamps the effect. Returns n/mean/median/stdev/cv plus a cv_note.
| Name | Type | Req | Description |
|---|---|---|---|
| nums | array | yes | Sample of numbers to summarize (mean, median, sample stdev, coefficient of variation) |
Structured output declared, but exposes no named fields.
No examples provided.
collision_probability Collision Probability ~121
Birthday-bound hash collision probability: 1 - exp(-n^2 / (2*2^b)). Sizes hashes: 1e6 items into 64 bits is ~2.7e-8; 1e5 into 32 bits is ~0.69 — the answer to 'can I truncate this to 8 hex chars?' (no).
| Name | Type | Req | Description |
|---|---|---|---|
| bits | integer | yes | Width of the hash in bits, e.g. 32, 64, 128 |
| items | integer | yes | Number of items being hashed |
Structured output declared, but exposes no named fields.
No examples provided.
compare_edge_cases Compare Edge Cases ~133
Run the same logic in N languages on edge-case inputs and flag divergence. Default inputs cover empty, zero, negative, and float-precision cases: ['', '0', '1', '-1', '10', '100', '0.1\n0.2']. Returns a per-input matrix plus a divergences list where languages disagree on identical input.
| Name | Type | Req | Description |
|---|---|---|---|
| inputs | – | – | Inputs to run every snippet on; omit for the default set covering empty/zero/negative/float cases |
| snippets | object | yes | Language name -> code; provide one correct snippet per language, implementing the same logic |
Structured output declared, but exposes no named fields.
No examples provided.
compare_execution Compare Execution ~227
Run the same code in multiple languages side by side. Returns per-language stdout/stderr/exit/duration plus which was fastest. Example: {"python3": "print(6*7)", "node": "console.log(6*7)"} This tool fans out across every language with no per-language install plumbing behind it; use `install_package`/`execute_code(dependencies=...)` beforehand instead. A `# /// script` block in a snippet is likewise never installed, but is DISCLOSED, not dropped: a python3 row that carries one gets `dependencies: {"status": "unsupported", "reason": ...}`.
| Name | Type | Req | Description |
|---|---|---|---|
| dependencies | – | – | Not supported here; any truthy value is refused — install packages beforehand instead |
| snippets | object | yes | Language name -> code; each snippet must be a complete, valid program in its own language |
| stdin | string | – | Text piped to every snippet's standard input; empty means no input |
| timeout | integer | – | Wall-clock seconds allowed per language before that run is killed |
Structured output declared, but exposes no named fields.
No examples provided.
compare_threshold Compare Threshold ~140
Exact threshold check with a verdict and the shortfall when it fails. Use calc_exact, not this, when you want the computed VALUE rather than a threshold comparison. `a OP b`. Both sides are evaluated exactly and printed as fractions — a threshold comparison written out cannot be gotten backwards. Example: ('1/25', '>', '0.05').
| Name | Type | Req | Description |
|---|---|---|---|
| a | string | yes | Left-hand numeric expression, evaluated exactly |
| b | string | yes | Right-hand numeric expression, evaluated exactly |
| op | string | yes | Comparison operator: one of ==, !=, >, >=, <, <= ('=' also accepted for ==) |
Structured output declared, but exposes no named fields.
No examples provided.
convert_units Convert Units ~176
Convert a value between units (dimensional analysis via sympy). Supports metric/imperial length, mass, time, speed, energy, power, force, pressure, temperature (°C/°F/K), volume, area, data sizes, frequency. Examples: ('60','mph','km/h'), ('100','celsius','fahrenheit'), ('1','gb','mib'). Use list_units for the full alias table.
| Name | Type | Req | Description |
|---|---|---|---|
| from_unit | string | yes | Source unit alias, e.g. 'mph', 'celsius', 'gb'; see list_units for all aliases |
| to_unit | string | yes | Target unit alias, e.g. 'km/h', 'fahrenheit', 'mib'; see list_units for all aliases |
| value | number | yes | Numeric quantity to convert, in `from_unit` |
Structured output declared, but exposes no named fields.
No examples provided.
data_sizes Data Sizes ~134
Byte counts for a plain integer, both binary and decimal — the gap between them is where '291 MB' and '277 MiB' silently disagree by 5%. For units other than bytes, use convert_units. For a duration, not a byte count, use human_duration. Returns `bytes` plus `binary` and `decimal` dicts of unit -> value.
| Name | Type | Req | Description |
|---|---|---|---|
| n | integer | yes | Byte count to express in both binary (KiB/MiB/GiB/TiB, /1024) and decimal (KB/MB/GB/TB, /1000) units |
Structured output declared, but exposes no named fields.
No examples provided.
epoch_time Epoch Time ~65
Epoch seconds/millis/micros/nanos to ISO 8601 UTC (implausible readings suppressed).
| Name | Type | Req | Description |
|---|---|---|---|
| n | string | yes | Epoch timestamp to convert to ISO 8601 UTC; units (seconds/millis/micros/nanos) are inferred from magnitude |
Structured output declared, but exposes no named fields.
No examples provided.
evaluate_expression Evaluate Expression ~146
Use evaluate_expression, not calc_exact, for something other than plain arithmetic on literal values. Symbolically evaluate to a value or closed form via sympify: 'integrate(x**2, x)', 'sqrt(144) + 2**10'. Not simplification — for simplified/factored/expanded forms, use symbolic(op="simplify"). Returns `value` (if the result is a number) or the evaluated expression, plus `type`.
| Name | Type | Req | Description |
|---|---|---|---|
| expression | string | yes | Symbolic math expression to evaluate via SymPy, e.g. 'integrate(x**2, x)', 'sqrt(144) + 2**10' |
Structured output declared, but exposes no named fields.
No examples provided.
execute_code Execute Code ~1,136
Execute `code` in `language` in a sandbox. Use this, not execute_code_stream/run_submit/session_run, for one program whose result you can wait for within a 120s cap. Returns stdout, stderr, exit_code, duration_ms, cpu_ms, peak_memory_kb, verdict (OK/TLE/MLE/OLE/RTE). - `session_id`: run inside a session workspace (see session_start); with a stateful session (python3/node) interpreter state persists across calls. Also reports `artifacts_created` (files just created/modified) since that workspace outlives the call; a sessionless run has none. See `session_run` for the same field plus inline content blocks. - `max_output_kb`: the 240 KiB hard ceiling is what the `anthropic/maxResultSizeChars` this tool advertises in its `_meta` already assumes — the cap leaves no headroom to raise past it without the real result exceeding that hint. A run whose real output needs more than 240 KiB belongs in a session instead: leave `max_output_kb` at its default (0) with `session_id` set (below), and oversized output SPILLS to a full-fidelity file readable via `session_read_file` rather than truncating — see the spill paragraph further down. An EXPLICIT `max_output_kb`, even under the 240 KiB ceiling, is honoured as a literal cap with no spill. - `no_net`: Linux enforces in-kernel via a seccomp-bpf filter. macOS / no-seccomp kernel: best-effort symbol shim, disclosed in `unenforced` when that's the only guarantee that held. See SECURITY.md. - `compact`: never drops `unenforced`, `output_error`, `artifacts_created`, or `dependencies` — if a guarantee you asked for was not applied, or a declared install failed, a compact result still says so. - `dependencies`: merged with a PEP 723 `# /// script` block for python3, deduped by normalized name with this argument winning; the only source for node. A block ALONE, with no `dependencies` argument, is enough to trigger an install — see SECURITY.md. Installed BEFORE the sandboxed step, through the s…
| Name | Type | Req | Description |
|---|---|---|---|
| code | string | yes | Source code to run in `language` |
| compact | boolean | – | Drop diagnostic fields (timings, workdir, platform) from the result; safety disclosures are always kept |
| dependencies | – | – | Packages to install before running, e.g. ['requests==2.31.0']; merged with any PEP 723 block |
| language | string | yes | Runtime to execute in, e.g. 'python3', 'node'; see list_languages for the full catalog |
| max_cpu | integer | – | Per-call CPU-time ceiling in seconds; 0 means no explicit limit is set |
| max_memory_mb | integer | – | Per-call memory ceiling in MiB; 0 means no explicit limit is set |
| max_output_kb | integer | – | Stdout/stderr capture cap in KiB per stream; 0 uses the 64 KiB default, hard-clamped to 240 |
| no_net | boolean | – | Block outbound network access for this run; best-effort on platforms without seccomp |
| provider | – | – | Execution backend id to use (see list_execution_providers); default picks automatically |
| session_id | – | – | Run inside this session's workspace (from session_start) instead of a throwaway sandbox |
| stdin | string | – | Text piped to the program's standard input; empty means no input |
| timeout | integer | – | Wall-clock seconds before the run is killed as TLE; clamped to a 120s ceiling |
Structured output declared, but exposes no named fields.
No examples provided.
execute_code_stream Execute Code Stream ~436
Execute code and STREAM progress + partial output as it runs. Use this, not execute_code/run_submit/session_run, for the same run when you want output while it runs, up to a 300s cap. Reports progress notifications to the client while the program runs, so agents can see output before the process finishes. Returns the same result shape and applies the SAME ceilings as execute_code: max_memory_mb, max_output_kb and max_cpu are forwarded to the executor exactly as execute_code forwards them, including the same 240 KiB per-stream clamp. `dependencies`: same as execute_code's (PEP 723 merge, `no_net`/policy refusal, 120s budget, workdir quota) — installed before streaming starts; a refusal/failed install is the stream's only event.
| Name | Type | Req | Description |
|---|---|---|---|
| code | string | yes | Source code to run in `language` |
| dependencies | – | – | Packages to install before running, e.g. ['requests==2.31.0']; merged with any PEP 723 block |
| language | string | yes | Runtime to execute in, e.g. 'python3', 'node'; see list_languages for the full catalog |
| max_cpu | integer | – | Per-call CPU-time ceiling in seconds; 0 means no explicit limit is set |
| max_memory_mb | integer | – | Per-call memory ceiling in MiB; 0 means no explicit limit is set |
| max_output_kb | integer | – | Stdout/stderr capture cap in KiB per stream; 0 uses the 64 KiB default, hard-clamped to 240 |
| no_net | boolean | – | Block outbound network access for this run; best-effort on platforms without seccomp |
| provider | – | – | Execution backend id to use (see list_execution_providers); default picks automatically |
| stdin | string | – | Text piped to the program's standard input; empty means no input |
| timeout | integer | – | Wall-clock seconds before the run is killed; clamped to a 300s ceiling (longer than execute_code's) |
Structured output declared, but exposes no named fields.
No examples provided.
extract_function Extract Function ~175
Extract a named function (with its imports + referenced helpers) into a standalone program and run it in the sandbox. python3 gets exact ast extraction; other languages best-effort block extraction (pass `call` to execute non-python). Returns the extracted program and per-input runs.
| Name | Type | Req | Description |
|---|---|---|---|
| call | – | – | Call expression to invoke the extracted function; required for non-python3 languages |
| code | string | yes | Source containing the function to extract, plus its imports and helpers |
| function_name | string | yes | Name of the function within `code` to extract into a standalone program |
| language | string | yes | Language `code` is written in; python3 gets exact ast extraction, others best-effort block extraction |
| test_inputs | – | – | Inputs to run the extracted program with, one run per input |
Structured output declared, but exposes no named fields.
No examples provided.
float_repr Float Repr ~119
What binary64 actually stores for X: exact value, raw bits, ULP, both neighbours, and whether the literal is representable. `float_repr(0.1)` shows 0.1000000000000000055511151231257827...; `float_repr(0.25)` says EXACT. Above 2^53 warns consecutive integers are indistinguishable.
| Name | Type | Req | Description |
|---|---|---|---|
| x | number | yes | Value to inspect as binary64: exact stored value, raw bits, ULP, neighbours, and representability |
Structured output declared, but exposes no named fields.
No examples provided.
human_duration Human Duration ~136
Convert a SPAN of elapsed seconds into a humanised duration (e.g. '2d 3h 4m 5s') plus per-day and per-30d rates. For an epoch timestamp to a calendar date, use epoch_time instead. For byte counts, not seconds, use data_sizes. Returns `human`, `per_day`, `per_30d`, and the echoed `seconds`.
| Name | Type | Req | Description |
|---|---|---|---|
| seconds | number | yes | Elapsed span in seconds (not a point-in-time timestamp) to humanize, e.g. into '2d 3h 4m 5s' |
Structured output declared, but exposes no named fields.
No examples provided.
install_package Install Package ~311
Install a package for a language (uv pip / npm / gem / go get / cargo add...). Asks the caller to confirm before installing (a protocol-level gate, not just the `anthropic/requiresUserInteraction` `_meta` hint — see codecalc/confirmation.py); a declined or malformed confirmation refuses with no install attempted. With session_id, executed code in that session can import the result. NETWORK: yes, always. The package manager fetches from its registry (PyPI, npm, rubygems, crates.io). codecalc opens no socket itself; the child process does. NOT SANDBOXED: the installer runs as a direct subprocess of the server, so install-time hooks (npm postinstall, Python build backends, Cargo build scripts) execute with the server user's filesystem access. The environment is still restricted to the allowlist, so secrets do not leak, but the filesystem is not confined. Do not point this at untrusted input. See SECURITY.md.
| Name | Type | Req | Description |
|---|---|---|---|
| language | string | yes | Language whose package manager installs the package, e.g. 'python3', 'node' |
| package | string | yes | Package name to install via that language's manager (uv pip/npm/gem/go get/cargo add) |
| session_id | – | – | Install into this session's workspace instead of the shared cache; omit for the shared cache |
| version | – | – | Exact version to install; omit to install the manager's default/latest |
Structured output declared, but exposes no named fields.
No examples provided.
list_execution_providers List Execution Providers ~148
List execution providers (execution BACKENDS — local subprocess, gVisor-strict, remote) and their machine-readable capabilities. This is about which BACKEND runs your code, not which LANGUAGE it runs — a provider's `ready`/`strict` fields are resolution facts about the backend itself. Per-language reliability (how much codecalc's CI has actually verified a given language's toolchain, vs merely resolved it) is a separate axis reported by `list_languages`/`runtimes_status`/`codecalc doctor` as `tier`; a `ready` provider says nothing about whether a specific language running through it has ever been execution-tested.
Input schema present but exposes no named parameters.
| Name | Type | Req | Description |
|---|---|---|---|
| result | array | yes | – |
No examples provided.
list_languages List Languages ~213
List every language codecalc can execute, with extension, compile flag, and what this machine resolved. `status` is `installed` (its command was found on the sandbox PATH) or `supported` (nothing for it here); `status_basis` is `resolved`, meaning nothing was executed to check. Run `codecalc doctor --deep` to promote a runtime to `available` by actually running it. `tier` is a DIFFERENT axis from `status`: `status` says whether THIS machine resolved the command (resolution); `tier` says whether codecalc's own CI has actually executed this language and asserted on its output (reliability) — `tested`, `best_effort` (declared, plausibly works, never CI-checked), or `plan_only` (never validated anywhere). A language can be `installed` here and still be `best_effort` or worse — that combination is exactly "the toolchain resolved and may still be broken".
Input schema present but exposes no named parameters.
| Name | Type | Req | Description |
|---|---|---|---|
| result | array | yes | – |
No examples provided.
list_units List Units ~24
List every supported unit alias — all aliases and spellings — for convert_units.
Input schema present but exposes no named parameters.
Structured output declared, but exposes no named fields.
No examples provided.
matrix Matrix ~233
Structured matrix operations: det, inverse, eigenvalues, transpose, rank, trace. `evaluate_expression` refuses `Matrix([[1,2],[3,4]])` on purpose — `[`/`]` are denied there to block subscript-based RCE escapes, and a matrix literal is collateral from that (correctly aimed) screen. This tool is the structured replacement: `rows` is a JSON array of arrays (row-major), never a string to parse. Each entry is either a JSON number, used directly, or a scalar expression string ('1/2', 'sqrt(2)', 'x+1'), screened per-entry the same way evaluate_expression screens its input before anything reaches SymPy. Example: rows=[[1,2],[3,4]], op='det' -> -2.
| Name | Type | Req | Description |
|---|---|---|---|
| op | string | yes | Operation to apply: one of det, inverse, eigenvalues, transpose, rank, trace |
| rows | array | yes | Row-major matrix as a JSON array of arrays; each entry is a number or a scalar expression string like 'sqrt(2)' |
Structured output declared, but exposes no named fields.
No examples provided.
percentage Percentage ~77
Exact share and percentage of PART / TOTAL. Use calc_exact for a single arithmetic expression, or compare_threshold to check the result against a threshold rather than just compute it.
| Name | Type | Req | Description |
|---|---|---|---|
| part | string | yes | Numerator expression (rationals accepted), evaluated exactly |
| total | string | yes | Denominator expression (rationals accepted), evaluated exactly |
Structured output declared, but exposes no named fields.
No examples provided.
percentiles Percentiles ~118
p50/p90/p95/p99 (the 50th/90th/95th/99th percentile cutoffs) by nearest-rank AND linear interpolation. Pairs with calc_stats, which gives mean/median/stdev/CV on the same sample instead of these distribution points. Warns when n < 100 that p99 is just the maximum wearing a label.
| Name | Type | Req | Description |
|---|---|---|---|
| nums | array | yes | Sample of numbers to compute p50/p90/p95/p99 for, by nearest-rank and linear interpolation |
Structured output declared, but exposes no named fields.
No examples provided.
physical_constants Physical Constants ~75
Look up a physical constant (speed_of_light, planck, avogadro, gravity, electron_mass, gas_constant, ...) or list all 22 with values.
| Name | Type | Req | Description |
|---|---|---|---|
| name | – | – | Constant to look up, e.g. 'speed_of_light', 'planck', 'avogadro'; omit to list all 22 |
Structured output declared, but exposes no named fields.
No examples provided.
radix_convert Radix Convert ~141
Convert a value between ANY bases 2..36, fractions included; bases that cannot represent the fraction (e.g. 0.1 in base 2) are flagged non-terminating. `radix_convert('zz', 36, 7)` is one call.
| Name | Type | Req | Description |
|---|---|---|---|
| from_base | integer | – | Base `value` is written in; valid range 2..36, default 10 |
| to_base | integer | – | Base to convert `value` into; valid range 2..36, default 10 |
| value | string | yes | Digit string to convert (fractions with '.' accepted), in `from_base` |
Structured output declared, but exposes no named fields.
No examples provided.
run_cancel Run Cancel ~225
Cancel a background run started with run_submit. Idempotent: calling this on a run that is already finished/cleaned reports `cancelled: false, state: <its actual terminal state>` rather than erroring — matching execute_code's own "no partial result" rule, there is nothing partial to hand back either way. Propagation depends on the SELECTED PROVIDER (see list_execution_providers' `cancel` capability). The built-in `local` provider does not support stopping a run once it has started; that is reported honestly here rather than silently pretended to have worked — the computation keeps running to completion and its result stays available via run_inspect, so bound it in advance with run_submit's own `timeout` instead. A provider that DOES advertise `cancel: true` reaches the full spawned process tree the same way execute_code's own cancellation does — RunSupervisor already owns that; this tool only calls it.
| Name | Type | Req | Description |
|---|---|---|---|
| run_id | string | yes | Id of a background run, as returned by run_submit |
Structured output declared, but exposes no named fields.
No examples provided.
run_inspect Run Inspect ~478
Poll a background run started with run_submit. While running: {"ok": True, "state": "running"|"cancelling", "run_id", "provider_id", "started_at", "deadline"}. Once terminal (`state` "finished"/"cleaned"/"recovered"), this returns the SAME result shape execute_code returns — stdout/stderr/exit_code/ verdict/unenforced/provider (the interface_version/provider_id/limits receipt)/... — merged with a small set of run_* extras (run_id, provider_id, started_at, deadline, state, cleaned; see server.py's _RUN_EXTRA_KEYS). This terminal reply carries the same `anthropic/maxResultSizeChars` `_meta` execute_code advertises (see server.py's `_LARGE_RESULT_TOOLS`) — it is the same envelope, once the run started with run_submit has finished, and run_submit's own `max_output_kb` is clamped the same way execute_code's is so that value stays true here too. Read `ok` and `verdict` on a terminal result to tell a clean finish from a failure; a run stopped by run_cancel is only reflected there for a provider that actually supports cancellation (see run_cancel's own docstring) — check the result the same way you would any other run. Retention: a finished run's result stays inspectable for the life of this server process — call this as many times as you like; nothing is consumed by reading it. What IS released on the first terminal read is the PROVIDER's own resources for that run (RunSupervisor.cleanup(), idempotent on repeat calls) — the in-memory record of the run itself is not evicted; there is no cap or TTL on it here, deliberately: the durable state machine, leases and TTL-based eviction are out of this residual's scope (see run_supervisor.py's own docstring). A long-lived server that calls run_submit very many times will grow this table; the on-disk crash-recovery journal underneath it is already bounded (RunSupervisor.max_completed), independent of this.
| Name | Type | Req | Description |
|---|---|---|---|
| run_id | string | yes | Id of a background run, as returned by run_submit |
Structured output declared, but exposes no named fields.
No examples provided.
run_submit Run Submit ~557
Submit code for BACKGROUND execution; returns a run_id immediately. Use this, not execute_code/execute_code_stream/session_run, when you do not want to hold the call open — poll run_inspect(run_id), and run_cancel(run_id) to stop it early. Same request shape as execute_code minus `session_id` (a run is a standalone process, not a session workspace). `timeout` bounds the WORK itself, not how long you wait to collect it. This call's own reply carries no output — a small run_id handle — so the `anthropic/maxResultSizeChars` hint lives on `run_inspect` instead, which returns the full envelope, same shape execute_code returns, once the run lands. Admission is capped (CODECALC_MAX_ACTIVE_RUNS, default 64): past that many runs still running/cancelling at once, this returns a resource_exhausted error rather than growing without bound — call run_inspect/run_cancel to make room, or wait for one to finish. Retention: see run_inspect. `dependencies`: same semantics as execute_code's own. A refusal is returned directly with no run created. Otherwise this call still returns immediately: the install itself runs on the background worker, ahead of the code, and a failed install becomes the run's own terminal error — readable via run_inspect(run_id) like any other outcome.
| Name | Type | Req | Description |
|---|---|---|---|
| code | string | yes | Source code to run in `language` |
| dependencies | – | – | Packages to install before running, e.g. ['requests==2.31.0']; merged with any PEP 723 block |
| language | string | yes | Runtime to execute in, e.g. 'python3', 'node'; see list_languages for the full catalog |
| max_cpu | integer | – | Per-call CPU-time ceiling in seconds; 0 means no explicit limit is set |
| max_memory_mb | integer | – | Per-call memory ceiling in MiB; 0 means no explicit limit is set |
| max_output_kb | integer | – | Stdout/stderr capture cap in KiB per stream; 0 uses the 64 KiB default, hard-clamped to 240 |
| no_net | boolean | – | Block outbound network access for this run; best-effort on platforms without seccomp |
| provider | – | – | Execution backend id to use (see list_execution_providers); default picks automatically |
| stdin | string | – | Text piped to the program's standard input; empty means no input |
| timeout | integer | – | Wall-clock seconds before the run is killed; clamped to a 120s ceiling, same as execute_code |
Structured output declared, but exposes no named fields.
No examples provided.
runtimes_status Runtimes Status ~200
Check every language runtime for available updates (NON-MUTATING). Reports current vs latest version per language, which package manager owns it (mise/rustup/swiftly/apt/npm/uv), and the exact command that would run. Each entry also carries `tier` (registry.RELIABILITY_TIERS) — see list_languages for what `tested`/`best_effort`/`plan_only` mean. A current, up-to-date toolchain can still be `best_effort`: `tier` is orthogonal to whether the update check below found a newer version. NETWORK: yes. Non-mutating refers to this machine's runtimes, not to traffic — each package manager is asked what the latest version is, and they answer by contacting their own remote index.
| Name | Type | Req | Description |
|---|---|---|---|
| languages | string | – | Comma-separated languages to check, e.g. 'python3,node,rust'; empty checks all |
Structured output declared, but exposes no named fields.
No examples provided.
session_artifacts Session Artifacts ~49
List files created by executed code in a session (excluding runner internals like main.py/run.out).
| Name | Type | Req | Description |
|---|---|---|---|
| session_id | string | yes | Id of the session whose executed-code output files to list |
Structured output declared, but exposes no named fields.
No examples provided.
session_files Session Files ~126
List workspace files, optionally using a bounded cursor page. Use session_artifacts, not this, for only the files executed code produced; use session_read_file for one file's contents.
| Name | Type | Req | Description |
|---|---|---|---|
| cursor | – | – | Opaque page cursor from a previous session_files call's response, to fetch the next page |
| page_size | – | – | Max entries per page; omit for one unpaginated listing |
| path | string | – | Subdirectory to list, relative to the workspace root; empty lists the root |
| session_id | string | yes | Id of the session whose workspace files to list |
Structured output declared, but exposes no named fields.
No examples provided.
session_list Session List ~16
List active sessions and their languages/state.
Input schema present but exposes no named parameters.
Structured output declared, but exposes no named fields.
No examples provided.
session_read_file Session Read File ~141
Read a file from a session workspace. Text files return content. With as_image=True (or for image files), the file is returned as an inline image the model can see. Use session_files to discover paths; session_artifacts lists what executed code produced.
| Name | Type | Req | Description |
|---|---|---|---|
| as_image | boolean | – | Return the file as an inline image the model can see, instead of text |
| max_bytes | integer | – | Max bytes to read from the file; default 65536 (64 KiB) |
| path | string | yes | Relative path inside the workspace to read |
| session_id | string | yes | Id of the session whose workspace file to read |
No output schema declared.
No examples provided.
session_run Session Run ~516
Run a multi-file program already written into a session workspace (via session_write_file). Use this, not execute_code/execute_code_stream/run_submit, when `entry_file` may import other files already in that workspace (helper.py, data/...). Runs as a fresh process in the session workdir (not the REPL worker), so relative imports and data files resolve. Returns stdout/stderr/verdict plus the entry file's path. Oversized output spills into the session workspace the same way execute_code's does — see its docstring for `stdout_spill`/`stderr_spill`. Reports `artifacts_created` and inlines small ones as extra content blocks (image/text/link), capped at 8 blocks / 4 MiB encoded; `truncated_inline: true` past either cap. `dependencies` installs packages before running, same rule as execute_code's — see its docstring. This tool takes no `max_output_kb` (its inline stdout/stderr stay at the 64 KiB default and spill past that, same as execute_code's session branch) but the `anthropic/maxResultSizeChars` `_meta` it advertises covers only that text envelope — the JSON result serialized as the reply's `content` text block. The inlined artifact blocks above (image/text/link, up to 8 of them within the 4 MiB encoded budget) are SEPARATE MCP content blocks, outside the text block this hint bounds. Every run copies `entry_file`'s own source into the runner's private scratch subdirectory before executing it — never into a root-level `main.<ext>` file a session's own files could collide with. A session's own `main.py` (or the equivalent for another language) at the session root is never touched by running a different entry file.
| Name | Type | Req | Description |
|---|---|---|---|
| dependencies | – | – | Packages to install before running, e.g. ['requests==2.31.0'] |
| entry_file | string | yes | Relative path of the file to execute; may import other files already in the workspace |
| language | – | – | Language to run `entry_file` as; omit to infer it from the session/file |
| session_id | string | yes | Id of the session workspace to run in |
| stdin | string | – | Text piped to the program's standard input; empty means no input |
| timeout | integer | – | Wall-clock seconds before the run is killed |
No output schema declared.
No examples provided.
session_snapshot Session Snapshot ~313
Archive or restore a session's workspace files. `action`: - "save": tar.gz the session's current files (same rules as session_artifacts: .codecalc-run/ excluded, symlinks/hardlinks refused) into a snapshot stored OUTSIDE the workspace, so sandboxed code can never read or tamper with it. Returns snapshot_id. - "restore": extract snapshot_id's files into a brand-new session (default) or, with replace=True, wipe and recreate session_id's OWN workspace first. Only files are restored — a python3/node session's REPL variables/imports are never part of a snapshot. - "list": snapshots saved for session_id, oldest first. - "delete": remove one snapshot (snapshot_id required). Snapshots are deleted when their session is stopped (session_stop(keep_snapshots=True) to keep them).
| Name | Type | Req | Description |
|---|---|---|---|
| action | string | – | One of 'save', 'restore', 'list', 'delete'; default 'save' archives the workspace |
| label | – | – | Optional human-readable label to store with a new snapshot; only used by action='save' |
| replace | boolean | – | For action='restore', wipe and reuse session_id's own workspace instead of creating a new session |
| session_id | string | yes | Id of the session the snapshot belongs to or is restored into |
| snapshot_id | – | – | Id of an existing snapshot; required for action='restore' or action='delete' |
Structured output declared, but exposes no named fields.
No examples provided.
session_start Session Start ~75
Start a persistent session. python3/node get a stateful REPL worker (variables/imports persist across execute_code calls); other languages get a persistent workspace directory. Returns session_id.
| Name | Type | Req | Description |
|---|---|---|---|
| language | string | – | Language for the new session's worker/workspace; default 'python3' gets a stateful REPL |
Structured output declared, but exposes no named fields.
No examples provided.
session_stop Session Stop ~82
Stop a session: kill its REPL worker (if any) and delete its workspace. Also deletes every session_snapshot saved for it, unless keep_snapshots=True.
| Name | Type | Req | Description |
|---|---|---|---|
| keep_snapshots | boolean | – | Keep this session's saved session_snapshot archives instead of deleting them |
| session_id | string | yes | Id of the session to stop, as returned by session_start |
Structured output declared, but exposes no named fields.
No examples provided.
session_write_file Session Write File ~93
Write a file into a session workspace (relative path, no escapes). Use this to seed input data for executed code.
| Name | Type | Req | Description |
|---|---|---|---|
| content | string | yes | Text content to write to `path`, overwriting any existing file |
| path | string | yes | Relative destination path inside the workspace; path escapes (e.g. '../') are refused |
| session_id | string | yes | Id of the session workspace to write into |
Structured output declared, but exposes no named fields.
No examples provided.
symbolic Symbolic ~586
Symbolic algebra, selected by `op` — replaces the four former standalone tools solve_expression, solve_linear, simplify_expression and limit_expression, retired in 0.12.0 (CHANGELOG.md). Every op returns exactly its former tool's own result, plus `op` (additive). op="solve" (was solve_expression) — the roots of one equation: 'x**2 - 4 = 0', '2*x + 1 = 7'. For a system of several equations, use op="solve_linear". For general constraint satisfiability (inequalities, boolean constraints, multiple solvers), use z3_check. Returns `solutions` as a list of strings alongside the parsed `equation` and `variable`. Used by this op: `expr` (required), `var` (optional). op="solve_linear" (was solve_linear) — a system of equations sharing variables. Example: system='x + y = 10; x - y = 2', variables='x, y'. Used by this op: `system`, `variables` (both required). op="simplify" (was simplify_expression) — simplify, factor, and expand an expression — algebraic forms, not solving (use op="solve") and not a numeric value (use calc_exact). Returns `simplified`, `factored`, and `expanded` as strings alongside the parsed `original`. Used by this op: `expr` (required). op="limit" (was limit_expression) — asymptotic behaviour: limit of `expr` as `var` -> `point`. 'symbolic("limit", "n*log(n)/n**2", "n")' returns 0 — settles complexity arguments faster than arguing. Used by this op: `expr` (required), `var` (optional), `point` (optional).
| Name | Type | Req | Description |
|---|---|---|---|
| expr | – | – | Expression or equation to solve/simplify/take the limit of; required by op='solve'/'simplify'/'limit' |
| op | string | yes | Which symbolic operation to run: 'solve', 'solve_linear', 'simplify', or 'limit' (each has its own required params) |
| point | – | – | Point `var` approaches for op='limit'; optional, default 'oo' (infinity) |
| system | – | – | ';'-separated equations for op='solve_linear', e.g. 'x + y = 10; x - y = 2'; required by that op |
| var | – | – | Variable to solve for or take the limit over; optional, default 'x'; used by op='solve'/'limit' |
| variables | – | – | Comma-separated variable names for op='solve_linear', e.g. 'x, y'; required by that op |
Structured output declared, but exposes no named fields.
No examples provided.
trace_execution Trace Execution ~624
Debug WHY, line by line, for the ONE input you actually ran it on: which statements fired, in what order, with what variable values at each step, and which if/elif/while/for/try branch was taken versus never taken. Want just the printed output instead? Use execute_code. Returns `events`: ordered `{step, line, event, func, locals}`, one entry per traced line/call/return/exception in YOUR code only (library internals excluded). `locals` on each entry is only the names that changed since the previous step in that same call — not a full dump every line. A `return` entry also carries `return_value`; an `exception` entry carries `exception_type`/`exception_message`. Also returns `branches` (hit count per if/elif/while/for/try line), `lines_executed` / `lines_never_executed` (coverage from a static parse), and `truncated`/`truncated_reason` when `max_events` or an internal size ceiling stopped RECORDING early (the underlying stdout/exit code are unaffected either way). TRUST: the trace is produced BY the traced program at its OWN privilege — a debugging aid, not an attestation of behaviour, exactly as trustworthy as that program's own stdout. `discarded_events` / `events_consistent` are a best-effort tamper/corruption signal (never a guarantee) computed independently of the file's own content. `unenforced` may additionally note "only the main thread is traced" (sys.settrace is per-thread) or, fallback backend only, an OLE `exit_code` race. For a structural Big-O guess with nothing executed, use analyze_complexity.
| Name | Type | Req | Description |
|---|---|---|---|
| code | string | yes | Source code to trace line by line |
| language | string | yes | Runtime to trace; only 'python3' is supported, any other value is refused |
| max_cpu | integer | – | Per-call CPU-time ceiling in seconds; 0 means no explicit limit is set |
| max_events | integer | – | Max trace events to record before truncating; the run's own stdout/exit code are unaffected |
| max_memory_mb | integer | – | Per-call memory ceiling in MiB; 0 means no explicit limit is set |
| max_output_kb | integer | – | Stdout/stderr capture cap in KiB per stream; 0 uses the 64 KiB default, hard-clamped to 240 |
| no_net | boolean | – | Block outbound network access for this run; best-effort on platforms without seccomp |
| provider | – | – | Execution backend id; only 'local' (the default) is supported here |
| stdin | string | – | Text piped to the program's standard input; empty means no input |
| timeout | integer | – | Wall-clock seconds before the run is killed; clamped to a 120s ceiling |
Structured output declared, but exposes no named fields.
No examples provided.
truth_table Truth Table ~177
Build the truth table for a boolean expression over and/or/not/xor/ implies/iff (plus true/false constants and variables): 'a and b or not c', 'p xor q', 'a implies b'. Use z3_check, not this, for satisfiability over inequalities or non-boolean variables; use evaluate_expression for symbolic (non-boolean) math. Returns `variables` (sorted names) and `rows` (one dict per assignment, each variable name -> bool plus `result`), plus `row_count`, `satisfiable` (any row true), and `tautology` (every row true).
| Name | Type | Req | Description |
|---|---|---|---|
| expression | string | yes | Boolean logic expression to tabulate, e.g. 'a and b or not c', 'p xor q', 'a implies b' |
Structured output declared, but exposes no named fields.
No examples provided.
update_runtimes Update Runtimes ~351
Update language runtimes. SAFE BY DEFAULT: with apply=False this is a dry run — it returns the update commands that WOULD run without changing anything. Pass apply=True to actually execute them (mise up, rustup update, swiftly update, apt-get upgrade of language packages, npm -g update, uv tool upgrade). apply=True asks the caller to confirm first (a protocol-level gate, not just the `anthropic/requiresUserInteraction` `_meta` hint — see codecalc/confirmation.py); apply=False is never gated, since nothing runs. PRIVILEGE: the apt manager updates system packages and its command begins with `sudo`. Those commands do NOT run unless the HOST has set CODECALC_ALLOW_RUNTIME_APPLY=1; without it they are reported as skipped with `ok: false` and the variable named, and the rest still run. Every entry carries an `elevated` flag either way. mise/rustup/swiftly/npm/uv touch user-owned toolchains and are never gated. NETWORK: yes, on both paths. apply=False still asks each manager what the latest version is, which is a remote lookup; apply=True additionally downloads and installs. "Dry run" bounds what changes on disk, not what is sent.
| Name | Type | Req | Description |
|---|---|---|---|
| apply | boolean | – | False (default) is a dry run reporting commands only; True actually runs them and asks for confirmation first |
| languages | string | – | Comma-separated languages to update, e.g. 'python3,node,rust'; empty updates all |
| timeout | integer | – | Wall-clock seconds allowed for the update commands to complete |
Structured output declared, but exposes no named fields.
No examples provided.
verify_optimization Verify Optimization ~351
PROVE an optimisation: same outputs, measurably AND SIGNIFICANTLY faster. Two gates, in order. Correctness: runs `candidate` against `original` on shared inputs — a faster-but-wrong candidate fails here and is never timed. Speed: times both at increasing sizes; accepts only when the median ratio clears `min_speedup` AND a one-sided Mann-Whitney U test rejects "not faster" at every counted size (2-3), or a Bonferroni-corrected majority above that — one size never accepts alone. See `inference` for the per-size U statistic, p-value, effect size. A rejection names which gate failed and by how much, e.g. "correct, 1.3x median, but only 1/4 sizes significant." Accepted grades `cross_checked`; any rejection — wrong, not faster enough, not significant — grades `ungraded`: correctness alone earns no grade for the speed claim this tool answers.
| Name | Type | Req | Description |
|---|---|---|---|
| candidate | string | yes | Optimised version of `original`, to prove correct and measurably faster |
| language | string | yes | Language both `original` and `candidate` are written in |
| min_speedup | number | – | Minimum median speedup ratio required to accept the optimisation; default 1.15 (15% faster) |
| original | string | yes | Baseline program to compare against |
| sizes | – | – | Input sizes to time both programs at (2-3+ sizes needed for significance); omit for defaults |
| test_inputs | – | – | Inputs to confirm both programs still agree on; omit to use the default set |
Structured output declared, but exposes no named fields.
No examples provided.
verify_translation Verify Translation ~277
PROVE that a port is equivalent: run both programs, compare their output. You write the translation — you are the language model. This runs your source and your port on the same inputs and reports, per input, whether they matched, diverged, or could not be compared (a runtime that is missing or a program that failed on both sides is INCONCLUSIVE, never a pass). Use it after porting anything: python3 -> go, node -> rust, a rewritten function against the original. Pair with compare_edge_cases to find the inputs worth testing. Matching tolerates only line-ending/trailing-whitespace noise; stdout_raw carries what actually ran. A pass is graded `cross_checked` (two independent implementations, run and agreeing — see `grade_basis` for which runtimes). A non-pass is graded `ungraded`: never a softer positive grade.
| Name | Type | Req | Description |
|---|---|---|---|
| source_code | string | yes | Original program, in `source_language` |
| source_language | string | yes | Language of `source_code` |
| target_code | string | yes | Ported program, in `target_language`, to check against `source_code` |
| target_language | string | yes | Language of `target_code` |
| test_inputs | – | – | Inputs to run both programs on and compare; omit to use the default edge-case set |
Structured output declared, but exposes no named fields.
No examples provided.
z3_check Z3 Check ~201
Use z3_check, not symbolic(op="solve"), for satisfiability over inequalities, boolean combinations, or several variables at once: sat/ unsat/unknown plus a model. Example: '(declare-const x Int)(assert (> x 5))(check-sat)'. `unsat` is graded `solver_proven` — see `grade_basis` for the engine version and timeout bound it was decided within. `sat` is graded `ungraded`: it's a real decided answer, just not a proof — reserving `solver_proven` for `unsat` means a counterexample can never wear a proof grade. `unknown` carries no proof either way and is also graded `ungraded`.
| Name | Type | Req | Description |
|---|---|---|---|
| smt2 | string | yes | SMT-LIB2 script to check for satisfiability, e.g. '(declare-const x Int)(assert (> x 5))(check-sat)' |
Structured output declared, but exposes no named fields.
No examples provided.
What is the codecalc MCP server?
codecalc is an MCP server listed in the public MCP registry as io.github.The-40-Thieves/codecalc. Code & logic calculator for AI agents: 31 languages, symbolic math, SMT/logic solving, Big-O. This page covers its PyPI package (codecalc).
Is the codecalc MCP server safe to use?
codecalc scores 77 out of 100 on VerifyMCP. We found no known CVEs affecting it as of 21 September 2026. That is a record of what we were able to check automatically, not an endorsement. The category breakdown on this page shows every signal behind the number, including the ones we could not confirm.
What tools does the codecalc MCP server expose?
codecalc exposes 49 tools: list_languages, list_execution_providers, execute_code, session_start, session_stop, and 44 more. Their descriptions and schemas cost roughly 11,718 tokens of context every time the server is loaded.
Is the codecalc MCP server still maintained?
codecalc is still listed as active in the MCP registry. We last reached this channel on 21 September 2026. Those dates come from our own scans of the registry and the channel itself, not from anything the publisher announced.