formula_search
Search the local formula library to retrieve accurate mathematical and physical formulas by keyword or domain.
Instructions
Search the local formula library.
Retrieve accurate mathematical/physical formulas from the local, editable
YAML library. This is deterministic, fast, and does not require network
access.
The query and domain are normalized automatically, so you can pass
free-form text such as "Navier–Stokes equations" or "fluid_dynamics".
Args:
query: Search keyword
- English name: "Reynolds number", "Arrhenius equation"
- Domain terms: "fluid dynamics", "quantum", "thermodynamics"
source: Data source
- "local": Local YAML library (default, recommended)
- "scipy": Physical constants only (no local search)
- "legacy": Search local, then Wikidata, BioModels, SciPy
- "all": Alias for "legacy" (kept for compatibility)
- "wikidata", "biomodels", "scipy": Legacy source only
domain: Restrict domain (optional)
- "mechanics", "thermodynamics", "electromagnetism"
- "fluid_dynamics", "fluid_mechanics", "quantum_mechanics"
limit: Maximum number of results to return
Returns:
{
"success": true,
"results": [...],
"total": 1,
"query": "navier-stokes equations",
"domain": "fluid",
"sources_searched": ["local"],
"next_steps": [...]
}
Example:
# Search the local library
formula_search("Reynolds number")
# Search by domain
formula_search("diffusion", domain="thermodynamics")
Correct workflow for derivation:
1. formula_search("<concept>", domain="<domain>")
2. formula_get(result["id"])
3. session_load_formula(formula["sympy_str"] or formula["latex"], ...)
4. math(..., session=True) to derive or transform
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | ||
| domain | No | ||
| source | No | local |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||