Skip to main content
Glama

List workspace variables

cm_list_workspace_vars
Read-only

List variables with their names, classes, and sizes from the MATLAB base workspace or a Simulink model workspace, optionally filtered by wildcard pattern.

Instructions

Variables (name, class, size) of the MATLAB base workspace or of a Simulink model's workspace. Controller parameters usually live in the model workspace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeNo'base' for the MATLAB base workspace, or the name of a loaded Simulink model for that model's workspacebase
patternNoWildcard filter on the name, e.g. 'Kp_*'

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safe-read nature is covered. The description adds that the result includes name/class/size and that it can target either base or model workspace, which is useful context. It does not describe filter/pagination behavior, so this is a modest add over the annotations.

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?

Two tight sentences with no filler, and the core action (listing variables and where) is front-loaded before the domain tip. Efficient and well ordered, though the parenthetical output list arguably duplicates what the output schema already provides.

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?

An output schema exists, so return-value detail need not be repeated, and the description covers both scopes plus a usage hint. Combined with full schema coverage and clean annotations, an agent has enough to invoke it correctly; only explicit sibling disambiguation is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents both the 'scope' and 'pattern' parameters, making 3 the baseline. The description's remark that controller parameters live in the model workspace does add interpretive value to the scope choice, but the wildcard-filter behavior of 'pattern' is left entirely to the schema.

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

Purpose4/5

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

States a specific verb-and-resource (listing variables of a workspace) and even previews the returned fields (name, class, size), so the agent knows exactly what it gets. It clarifies the two possible scopes (MATLAB base vs. Simulink model workspace). It stops short of explicitly naming a sibling like cm_get_workspace_var to disambiguate, so it earns a 4 rather than a 5.

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?

The closing sentence 'Controller parameters usually live in the model workspace' gives contextual guidance on which scope to query. However, it never states when to use this tool versus alternatives (e.g. cm_get_workspace_var for a single variable) or names any exclusion. Usage is implied rather than spelled out.

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