Skip to main content
Glama
Axiomatic-AI

axiomatic-mcp

Official
by Axiomatic-AI

AxModelFitter_fit_model

Fit custom JAX mathematical models to experimental data using numerical optimization. Requires data file, model function, and parameter bounds.

Instructions

Fit a custom JAX mathematical model against experimental data.

This tool fits user-defined mathematical models to data using numerical optimization.
All data MUST be provided via files (CSV, Excel, JSON, Parquet) - no direct data input.

REQUIRED INPUTS:
1. data_file: Path to your data file (e.g., "/path/to/data.csv")
2. input_data: Maps file columns to input variables
3. output_data: Maps file columns to output variables
4. function_source: JAX function code using jnp operations
5. parameters: Initial parameter guesses with units
6. bounds: Bounds for ALL parameters, inputs, and outputs

DATA MAPPING EXAMPLE:
- data_file: "/Users/data/experiment.csv"
- input_data: [{"column": "time_col", "name": "t", "unit": "second"}]
- output_data: {"columns": ["voltage"], "name": "v", "unit": "volt"}

FUNCTION REQUIREMENTS:
- MUST use JAX operations: jnp.exp(-rate*t), jnp.sin(freq*t), jnp.sqrt(x)
- Valid pint units: 'dimensionless', 'second', 'volt', 'meter', etc.
- All variables (parameters, inputs, outputs) need bounds

RETURNS: Optimized parameters, R², execution time, and result files

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boundsYesALL parameter/input/output bounds: [{'name': 'a', 'lower': {'magnitude': 0, 'unit': 'dimensionless'}, 'upper': {'magnitude': 10, 'unit': 'dimensionless'}}]
max_timeNoMaximum optimization time in seconds
constantsNoFixed constants: [{'name': 'c', 'value': {'magnitude': 3.0, 'unit': 'meter'}}]
data_fileYesPath to data file (CSV, Excel, JSON, Parquet). All data must be provided via file.
docstringNoBrief description of the model
input_dataYesInput column mappings: [{'column': 'time', 'name': 't', 'unit': 'second'}, {'column': 'x_col', 'name': 'x', 'unit': 'meter'}]
model_nameYesModel name (e.g., 'ExponentialDecay', 'RingResonator')
parametersYesInitial parameter guesses: [{'name': 'a', 'value': {'magnitude': 2.0, 'unit': 'dimensionless'}}]
file_formatNoFile format: 'csv', 'excel', 'json', 'parquet' (auto-detect if None)
jit_compileNoEnable JIT compilation for performance
output_dataYesOutput column mapping: {'columns': ['signal'], 'name': 'y', 'unit': 'volt'} OR {'columns': ['y1', 'y2'], 'name': 'y', 'unit': 'volt'}
function_nameYesFunction name that computes the model output
optimizer_typeNoOptimizer: 'nlopt' (best default), 'scipy' (simple), 'nevergrad' (gradient-free)nlopt
function_sourceYesJAX function source code. MUST use jnp operations: jnp.exp, jnp.sin, etc.
optimizer_configNoOptimizer config: {'use_gradient': True, 'tol': 1e-6, 'max_function_eval': 1000000}
cost_function_typeNoCost function: 'mse' (default), 'mae', 'huber (with delta=1.0)', 'relative_mse'mse
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses key behavioral traits: uses numerical optimization, returns optimized parameters, R², execution time, and result files. Mentions JIT compilation and optimizer options. No annotations exist, so description carries full burden.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with sections (description, required inputs, example, requirements, returns) and front-loaded purpose. Some redundancy (e.g., 'All data MUST be provided via files' repeated), but overall efficient for a complex tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers essential aspects: data input, parameter mapping, function requirements, and returns. Missing details on error handling or multiple output scenarios, but schema provides parameter details. Adequate for the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Adds significant value beyond the schema by grouping parameters into required inputs, providing data mapping examples, explaining JAX function requirements, and clarifying unit usage. Schema coverage is 100%, so high baseline, but description enhances understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the tool fits custom JAX mathematical models to experimental data using files. Verb 'fit' and resource 'custom JAX model' are specific, and the description distinguishes it from siblings like cross_validate_model or compare_models.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit required inputs and emphasizes file-based data input, but does not discuss when to use this tool versus other fitting tools (e.g., cross_validation) or when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Axiomatic-AI/ax-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server