precis-static
Stateless tools for an assistant, as plugins of mcp-dispatch. Each wraps a Python library. There is no database, no network and nothing kept between calls, so any host can install them: the answer depends on the call alone.
They were distilled from the kinds of the same names in precis-mcp.
| Package | Actions | Library | For |
|---|---|---|---|
calc |
calc/eval |
sympy, pint | exact arithmetic, calculus, solving, matrices; unit conversion with a to clause |
time |
time/at, time/window |
standard library | now; a timestamp read, converted to a zone, formatted; a phrase such as "last week" as UTC bounds |
random |
random/slug |
secrets |
a short random name that says nothing |
chem |
chem/mol, chem/rxn |
rdkit (extra chem) |
canonical SMILES, formula, mass and InChIKey of a molecule; identity keys of a reaction |
words |
words/of, words/read |
none | a name to say aloud for an id: its last bits as a few common words, and back |
get {"path": "calc/eval", "q": "integrate(exp(-x**2), (x, -oo, oo))"} -> ... = sqrt(pi)
get {"path": "calc/eval", "q": "3 ft + 2 in to cm"} -> 3 ft + 2 in = 96.52 cm
get {"path": "time/at", "q": "tomorrow 9am", "zone": "Europe/Zurich", "to": "Asia/Tokyo"}
get {"path": "time/window", "q": "last week"}
get {"path": "random/slug", "len": 8}
get {"path": "chem/mol", "smiles": "OC(=O)c1ccccc1OC(C)=O"}
get {"path": "words/of", "hex": "adfa0923"} -> pine giant eagle
Three how-to guides ship with it and are found by the host's search for skills: calculate-and-convert, read-a-time, compare-molecules.
Use
pip install precis-static # calc, time, random, words
pip install "precis-static[chem]" # and chem, with rdkit
A host of mcp-dispatch finds the five plugins by itself (Dispatch().find_plugins()); they are listed under the entry point group mcp_dispatch.plugins, and under reticula.plugins for Reticula. Without rdkit the chem plugin still loads and answers each call with "not installed here".
From a shell, with the same calls:
uv run mcp-dispatch call get calc/eval "q=3 ft to m"
uv run mcp-dispatch help time/at
calc evaluates mathematics, not Python
sympy reads a string with Python's eval, with every builtin in reach; most of its functions parse a string they are handed; and for some numeric work it prints an expression as Python source and runs that. An expression passed straight to sympy.sympify can therefore run anything: in the handler this was distilled from, __import__('os').system('...') as the expression ran the command.
Here an expression is never given to eval. sympy's tokenizer makes a syntax tree of it, and a small interpreter walks the tree:
- a name is one of sympy's mathematical classes, constants, or functions from its mathematical modules; nothing that prints, plots, reads files, builds code or changes global state;
- a method is one of a fixed list (
.subs,.diff,.inv,.evalf, ...); - every value on the way is checked to be mathematics: a sympy object, a matrix, a number, or a list of those. A string, a class or any other Python object ends the evaluation where it appears;
- a quoted string stands only as a symbol's name, a number's digits, or one of five option words; a symbol cannot be named after a builtin or keyword of Python, and a function of your own is one letter;
- as a second line, sympy's own parser refuses text that names anything of Python for the length of a call.
A first version checked the source and then evaluated it; a red-team pass of 865 expressions found ways to run code through it (functions named exec that sympy compiled, strings sympy hands out). Those expressions are in the test suite and are refused by the interpreter. The interpreter itself has had no red-team pass of its own yet.
Not bounded: time and memory. 9**9**9 is mathematics and keeps a process busy. A host that takes expressions from strangers runs calls under a deadline of its own.
words names the end of a key
A word stands for seven bits. The last word is a noun and names the key's last seven bits; before it come an adjective, a colour, an adjective and so on, each naming the seven bits before. The front of the key is what is cut off, so a shorter name is the end of the longer one:
get {"path": "words/of", "hex": "adfa0923", "bits": 14} -> giant eagle
get {"path": "words/of", "hex": "adfa0923"} -> pine giant eagle
get {"path": "words/of", "hex": "adfa0923", "bits": 32} -> cyan bouncy pine giant eagle
get {"path": "words/read", "q": "giant eagle"} -> 2339 (hex 923): the last 14 bits of a key
The caller says how many bits must be told apart and gets the fewest words that carry them (21 by default, three words). Keys that end in the same bits share a name. Which keys exist is the host's knowledge, so the host chooses the bits (few while few things are in play, more as they grow) and, when a name fits several keys, asks the person which is meant. A host uses the functions directly:
from precis_static.words import to_number, to_words
to_words(0xADFA0923, bits=14) # "giant eagle"
to_number("pine giant eagle") # (1706275, 21): every key with key % 2**21 == 1706275
The three lists of 128 words are those of precis-mcp, and a number below 2,097,152 has the three words it has there. Editing a list renames keys.
What stayed in precis-mcp
A kind was moved when it needs nothing but a library. These need more and stayed:
| Kind | Why |
|---|---|
math |
asks Wolfram Alpha: a key, the network, a cache |
chem (name or CAS number to structure) |
asks OPSIN and PubChem and caches the answer; only the rdkit part came here |
random (a random block of the corpus) |
reads the database; only the slug came here |
rxn, structure, material, measure, estimate, cad, pcb, se |
store what they compute, or work on stored things |
the numeric kernels precis_chain, precis_flow, precis_geom, precis_surface |
libraries with no kind of their own; they are called by the kinds above |
Candidates that would fit here and are not built: the reaction classifier (rdkit templates to an RXNO class), which needs its template table moved with it; the composition tier of estimate (element properties and alloying heuristics from ase), which is a few hundred lines once its cache is taken off; unit-aware quantities beyond conversion.
Development
uv sync
uv run pytest
uv run ruff check . && uv run ruff format --check . && uv run mypy
uv run mcp-dispatch check # what an assistant reads is in order
mcp-dispatch comes from PyPI (mcp-dispatch>=0.3.0,<0.4).
Licence
GPL-3.0-or-later, as precis-mcp, from which the code was taken. See LICENSE.
Metadata
Release files for precis-static 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| precis_static-0.1.0.tar.gz | 239.5 kB | With provenance | Details for precis_static-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| precis_static-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for precis_static-0.1.0-py3-none-any.whl |
Total release size: 309.5 kB
Release files / precis_static-0.1.0.tar.gz
| Download URL | precis_static-0.1.0.tar.gz |
|---|---|
| Size | 239.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c4db5dd54a6719cc88de479007aa777892d71bebe495acb935cf8a59b755165
|
|
BLAKE2b-256 checksum How to use checksums |
154e0757e74338ddc26135fa5c664f83c572732389c7d95ae00ad7e4d966a075
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.
Transparency logRelease files / precis_static-0.1.0-py3-none-any.whl
| Download URL | precis_static-0.1.0-py3-none-any.whl |
|---|---|
| Size | 70.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1850b3b063e3c1ccba3cdb71d7deba2ab895b2852d1c27770b9037a0ec659e2f
|
|
BLAKE2b-256 checksum How to use checksums |
3d81d1cdd084be3c41d89b3bb7964ddcbfd9747a0ce5d12640c8370487cd46a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.
Transparency logSecurity for precis-static 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for precis_static-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.