{"api":"v1","generated_at":"2026-09-15T18:46:02.963Z","licence":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/","attribution":"TOLL, with a link to the page cited"},"page":"https://tollindex.com/e/api-statemind-ai-mcp-execute-python-e97c4a","pinned_page":"https://tollindex.com/e/api-statemind-ai-mcp-execute-python-e97c4a/at/2026-09-15T16-57Z","pinned":false,"method":"https://tollindex.com/ledger/method","snapshot_at":"2026-09-15T16:57:44.360Z","snapshot_stamp":"2026-09-15T16-57Z","endpoint":{"slug":"api-statemind-ai-mcp-execute-python-e97c4a","canonical_url":"https://api.statemind.ai/mcp#execute_python","resource":"https://api.statemind.ai/mcp#execute_python","http_method":null,"type":"mcp","x402_version":2,"registries":[],"primary_registry":"cdp","curated_by_coinbase":false,"description":"Run Python in a throwaway container with no network and a read-only filesystem, and report what it did against the caller's examples.","service_name":null,"declared_category":null,"declared_tags":[],"route_template":null,"registry_updated":"2026-08-16T15:34:42.505Z"},"derived":{"note":"fields no registry supplies; TOLL derives them and marks them derived on the page","title":"execute python","category":"identity","first_observed_by_toll":"2026-09-10T19:08:24.178Z","last_observed_by_toll":"2026-09-15T11:42:41.317Z","observation_began":"2026-09-10"},"presence":{"listed_now":false,"first_absent_at":"2026-09-15T16:57:44.360Z","delisting_confirmed_at":null,"events":[{"registry":"cdp","at":"2026-09-10T19:08:24.178Z","event":"listed"},{"registry":"cdp","at":"2026-09-15T16:57:44.360Z","event":"delisted"}]},"accepts":[{"registry":"cdp","ordinal":0,"network":"eip155:8453","asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","asset_name":"USD Coin","symbol":"USDC","decimals":6,"amount_display":"0.1 USDC","amount_units":0.1,"decimals_known":true,"pay_to":"0xaa7116CdDA58286F4cdA40C6F735762C22447104","scheme":"exact"}],"counters":{"observed_at":"2026-09-15T11:42:41.317Z","calls_30d":0,"unique_payers_30d":0,"last_called_at":"2026-08-16T15:34:42.505Z"},"validation":{"latest":{"observed_at":"2026-09-15T06:53:42.818Z","state":"unknown_method","failed_checks":[],"endpoint_http_status":null,"run_id":"daily-2026-09-15"},"uptime":[{"days":7,"observed":0,"passed":0,"ratio":null},{"days":30,"observed":0,"passed":0,"ratio":null},{"days":90,"observed":0,"passed":0,"ratio":null}],"history_90d":[{"observed_at":"2026-09-15T06:53:42.818Z","state":"unknown_method","failed_checks":[],"run_id":"daily-2026-09-15","state_changed":false},{"observed_at":"2026-09-14T06:21:13.613Z","state":"unknown_method","failed_checks":[],"run_id":"daily-2026-09-14","state_changed":false},{"observed_at":"2026-09-13T06:11:37.566Z","state":"unknown_method","failed_checks":[],"run_id":"daily-2026-09-13","state_changed":false},{"observed_at":"2026-09-12T08:29:10.526Z","state":"unknown_method","failed_checks":[],"run_id":"daily-2026-09-12","state_changed":false},{"observed_at":"2026-09-11T14:38:16.639Z","state":"unknown_method","failed_checks":[],"run_id":"daily-2026-09-11","state_changed":true}]},"seller":{"wallet":"0xaa7116CdDA58286F4cdA40C6F735762C22447104","page":"https://tollindex.com/seller/0xaa7116CdDA58286F4cdA40C6F735762C22447104","endpoints":6,"hosts":1},"reports":0,"registry_record":{"cdp":[{"type":"mcp","accepts":[{"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","extra":{"name":"USD Coin","version":"2"},"payTo":"0xaa7116CdDA58286F4cdA40C6F735762C22447104","amount":"100000","scheme":"exact","network":"eip155:8453","maxTimeoutSeconds":60}],"quality":{"lastCalledAt":"2026-08-16T15:34:42.505Z","l30DaysTotalCalls":0,"l30DaysUniquePayers":0},"resource":"https://api.statemind.ai/mcp#execute_python","extensions":{"bazaar":{"info":{"input":{"type":"mcp","example":{"code":"def bitcount(n):\n    count = 0\n    while n:\n        n ^= n - 1\n    return count\n","options":{"examples":"assert bitcount(127) == 7\nassert bitcount(0) == 0"}},"toolName":"execute_python","transport":"streamable-http","description":"Run Python in a throwaway container with no network and a read-only filesystem, and report what it did against the caller's examples.","inputSchema":{"type":"object","$defs":{"Mode":{"enum":["static","repair","execute"],"type":"string","title":"Mode","description":"How much work the service is allowed to do.\n\n``static``\n    Never executes the submitted code. Parsing, linting and security\n    scanning only. This is the default and the only mode that is safe to\n    expose without a container sandbox.\n``repair``\n    Static mode plus deterministic auto-fixes and refactors.\n``execute``\n    Repair plus running the code inside a sandbox to prove it works."},"Options":{"type":"object","title":"Options","properties":{"examples":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Examples","default":null,"description":"What the code is supposed to do, as doctest lines ('>>> f(2)' on one line, '4' on the next) or as plain assertions ('assert f(2) == 4'). In execute mode they are run in the sandbox: an example that does not hold is a 'python:example-mismatch' error and makes the response invalid, and repair searches for a single-token change that makes every one of them pass. This is the only way the service can tell code that runs from code that is right, so send it whenever you know what you asked for. Examples already written in the code ('>>> ' in any string) are used the same way without this option. Ignored in the other modes, which run nothing."},"optimize":{"type":"boolean","title":"Optimize","default":false,"description":"Run constant folding / dead-code elimination. Off by default: the optimiser rewrites the program, and a rewrite is only returned when it provably keeps every effectful construct."},"timeout_s":{"anyOf":[{"type":"number","maximum":60,"exclusiveMinimum":0},{"type":"null"}],"title":"Timeout S","default":null,"description":"Wall-clock budget for running the code. Omitted means the service's own default (MSVC_DEFAULT_TIMEOUT_S). Only execute mode runs anything; a deployment may cap this below the 60 the schema allows and refuses a larger value."},"transpile_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transpile To","default":null,"description":"Target language for a transpiled copy, e.g. 'javascript'. The copy is made from the code as it ends up, so in repair and execute mode it translates the repaired source rather than the submitted one."},"max_iterations":{"type":"integer","title":"Max Iterations","default":3,"maximum":10,"minimum":1,"description":"How many fix/verify rounds the repair loop may take. Ignored in static mode, which changes nothing."},"expected_output":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Output","default":null,"description":"Exact stdout the code must produce in execute mode. A mismatch is an 'expected-output' diagnostic and makes the response invalid, even when the program exits cleanly. Ignored in the other modes, which produce no output."}},"description":"Per-request tuning knobs."},"Language":{"enum":["python","javascript","typescript","html","sql","solidity","other"],"type":"string","title":"Language","description":"Source languages a validator can accept."}},"title":"ValidateRequest","required":["code"],"properties":{"code":{"type":"string","title":"Code","maxLength":200000,"minLength":1,"description":"The source to check, as a whole file where possible: diagnostics carry the line and column of the text you send, and a fragment hides the imports and definitions the type check needs. A deployment may accept fewer bytes than the 200000 here."},"options":{"$ref":"#/$defs/Options","description":"Tuning knobs. Most of them only take effect in the mode that does the corresponding work; see each field."},"language":{"$ref":"#/$defs/Language","default":"python","description":"The language of the code. A service that does not handle it refuses the request rather than guessing; the enum is shared across services, so it lists more than any one of them accepts."}},"description":"A validation job submitted by an agent."}},"output":{"type":"json","example":{"score":0.4,"valid":false,"fixed_code":"def bitcount(n):\n    count = 0\n    while n:\n        n &= n - 1\n        count += 1\n    return count\n","diagnostics":[{"code":"python:example-mismatch","message":"assert bitcount(127) == 7 failed: the code loops forever","severity":"error"}]}}},"schema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","toolName","inputSchema"],"properties":{"type":{"type":"string","const":"mcp"},"example":{"type":"object"},"toolName":{"type":"string"},"transport":{"enum":["streamable-http","sse"],"type":"string"},"description":{"type":"string"},"inputSchema":{"type":"object"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}}}},"description":"Run Python in a throwaway container with no network and a read-only filesystem, and report what it did against the caller's examples.","lastUpdated":"2026-08-16T15:34:42.505Z","x402Version":2}]}}