-
Notifications
You must be signed in to change notification settings - Fork 0
MCP Tools Reference
The server exposes 20 built-in tools plus any custom tools defined in your custom_tools.yaml.
Execute MATLAB code in the session's engine.
| Parameter | Type | Required | Description |
|---|---|---|---|
code |
string | yes | MATLAB code to execute |
Behavior:
- Runs synchronously if it completes within
sync_timeout(default 30s) - Auto-promotes to async if it exceeds the timeout
- Returns inline result for sync, or
job_idfor async
Example response (sync):
{
"status": "completed",
"output": "ans =\n 15",
"execution_time": 0.23
}Example response (async promotion):
{
"status": "running",
"job_id": "abc123-def456",
"message": "Job promoted to async execution"
}Lint MATLAB code using checkcode/mlint.
| Parameter | Type | Required | Description |
|---|---|---|---|
code |
string | yes | MATLAB code to check |
Example response:
{
"issues": [
{
"line": 3,
"column": 5,
"message": "Variable 'x' might be unused",
"severity": "warning"
}
],
"summary": "1 warning(s), 0 error(s)"
}Get variables in the current MATLAB workspace.
| Parameter | Type | Required | Description |
|---|---|---|---|
| (none) | — | — | — |
Returns the output of MATLAB's whos command.
Get status and progress of a running job.
| Parameter | Type | Required | Description |
|---|---|---|---|
job_id |
string | yes | Job ID from execute_code
|
Example response:
{
"job_id": "abc123",
"status": "running",
"progress": 65.0,
"message": "Trial 650000/1000000",
"elapsed_seconds": 120.5
}Get the full result of a completed job.
| Parameter | Type | Required | Description |
|---|---|---|---|
job_id |
string | yes | Job ID |
Cancel a pending or running job.
| Parameter | Type | Required | Description |
|---|---|---|---|
job_id |
string | yes | Job ID |
List all jobs in the current session.
| Parameter | Type | Required | Description |
|---|---|---|---|
| (none) | — | — | — |
List available MATLAB toolboxes (filtered by config).
| Parameter | Type | Required | Description |
|---|---|---|---|
| (none) | — | — | — |
List functions in a specific toolbox.
| Parameter | Type | Required | Description |
|---|---|---|---|
toolbox_name |
string | yes | Name of the toolbox |
Get MATLAB help text for any function.
| Parameter | Type | Required | Description |
|---|---|---|---|
function_name |
string | yes | Function name |
Upload a data file to the session's temp directory.
| Parameter | Type | Required | Description |
|---|---|---|---|
filename |
string | yes | Target filename |
content_base64 |
string | yes | File content, base64-encoded |
Limits: Max upload size is configurable (default 100MB). Filenames are sanitized to prevent path traversal.
Delete a file from the session's temp directory.
| Parameter | Type | Required | Description |
|---|---|---|---|
filename |
string | yes | File to delete |
List files in the session's temp directory.
| Parameter | Type | Required | Description |
|---|---|---|---|
| (none) | — | — | — |
Get the current engine pool status.
| Parameter | Type | Required | Description |
|---|---|---|---|
| (none) | — | — | — |
Example response:
{
"total_engines": 4,
"available": 2,
"busy": 2,
"max_engines": 10
}Read a MATLAB .m script file from the session temp directory.
| Parameter | Type | Required | Description |
|---|---|---|---|
filename |
string | yes |
.m file to read |
Returns the file content as inline text.
Read a data file from the session temp directory.
| Parameter | Type | Required | Description |
|---|---|---|---|
filename |
string | yes | Data file to read |
format |
string | no |
summary (default) or raw
|
Behavior by file type:
-
.matsummary: shows variable names, sizes, types via MATLABwhos -
.matraw: returns base64-encoded content -
.csv,.txt,.json: returns text content -
.xlsx: returns base64-encoded content
Read an image file from the session temp directory. Returns an inline image that renders in agent UIs.
| Parameter | Type | Required | Description |
|---|---|---|---|
filename |
string | yes | Image file (.png, .jpg, .gif) |
Get comprehensive server metrics (pool, jobs, sessions, system).
| Parameter | Type | Required | Description |
|---|---|---|---|
| (none) | — | — | — |
Example response:
{
"pool": {"total": 2, "available": 1, "busy": 1, "max": 10, "utilization_pct": 50.0},
"jobs": {"active": 1, "completed_total": 47, "failed_total": 2, "avg_execution_ms": 28.5},
"sessions": {"total_created": 5, "active": 3},
"errors": {"total": 2, "blocked_attempts": 0},
"system": {"uptime_seconds": 3600.1, "memory_mb": 108.8, "cpu_percent": 12.3}
}Get health status with issue detection.
| Parameter | Type | Required | Description |
|---|---|---|---|
| (none) | — | — | — |
Status values: healthy, degraded, unhealthy
Example response:
{
"status": "healthy",
"uptime_seconds": 3600.1,
"issues": [],
"engines": {"total": 2, "available": 1, "busy": 1},
"active_jobs": 1,
"active_sessions": 3
}Get recent errors and notable events.
| Parameter | Type | Required | Description |
|---|---|---|---|
limit |
integer | no | Number of recent events to return (default 20) |