Skip to main content
Glama

Get Variables

get_variables

Retrieve variables and DataFrame information from a live marimo notebook session. Filter by specific names or get all session variables, excluding scaffolding.

Instructions

Get tables and variables information in the session.

Returns information about kernel variables and DataFrames. If variable_names is empty, returns all variables — meaning the notebook's own session names, with the inspection template's scaffolding (its imports and helpers) excluded, since the scratchpad shares the kernel namespace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
server_urlNoOptional server URL override.
session_idNoSession ID from list_active_notebooks. Optional if an active session is bound.
variable_namesNoSpecific variables to inspect. Empty = all. Accepts a single name, a native array, or a JSON-encoded array — a harness may deliver either of the latter two as a string.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.3

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does disclose a genuinely non-obvious trait: empty variable_names returns the notebook's own session names with the inspection template's scaffolding excluded, since the scratchpad shares the kernel namespace. 'Get' implies a read-only operation, and return values are covered by the output schema, so the remaining gap is minor.

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?

Three sentences, front-loaded with the core purpose and then the empty-argument semantics. The parenthetical scaffolding explanation earns its place, though the phrasing is slightly dense.

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 format need not be described, and the read-only nature is implied. The description covers purpose, scoping behavior, and the empty-argument case, leaving little an agent needs that is missing.

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?

Schema coverage is 100%, establishing a baseline of 3, and the description adds meaning beyond the schema by explaining what 'empty' actually returns — the notebook's own names minus template scaffolding — which the schema's bare 'Empty = all' does not convey.

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?

The description states a specific verb+resource: 'Get tables and variables information in the session,' and clarifies it returns kernel variables and DataFrames. It is clearly distinguishable from sibling cell/error tools, though it never explicitly names an alternative for contrast.

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?

Usage is implied by context ('in the session', inspecting kernel state), but there is no explicit when-to-use guidance and no exclusions relative to siblings like get_cell_outputs or get_dependency_graph. An agent can infer intent but is not directed.

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