Skip to main content
Glama

tensor_to_table

Flatten a tensor into a table with one row per coordinate of a chosen dimension and feature columns for other combinations, dropping all-NaN columns. Apply select/reduce first, then analyze.

Instructions

Flatten a tensor into a table: one row per coordinate of row_dim, one feature column per combination of the other dims (time x lat x lon -> time rows x gridpoint columns). All-NaN columns are dropped; the row coordinate becomes a label column. select/reduce (as in slice_tensor) are applied first. Then describe/project/cluster it like any table.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "row_dim": "<row_dim>"
    },
    "name": "tensor_to_table"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
reduceNo
selectNo
row_dimYes
new_nameNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden, and it does disclose two real traits: all-NaN columns are dropped and the row coordinate becomes a label column. It does not say whether the operation is read-only or whether writing to new_name can overwrite an existing table, nor does it describe any failure modes for an invalid row_dim.

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?

Front-loaded with the core shape transformation, then edge behavior, then pipeline ordering — a sensible order with no filler. The parenthetical example earns its space by making the flattening unambiguous. Minor compression possible around the slice_tensor reference.

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

Completeness3/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 values need not be explained, and the reshaping semantics are well covered. However, for a tool that appears to materialize a named table, the description never clarifies what 'name' refers to (source tensor) or what 'new_name' produces, leaving an agent guessing about a mutation side effect.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must define all five parameters, but only row_dim ('one row per coordinate') is genuinely explained. select and reduce are only referenced indirectly ('as in slice_tensor'), while name and new_name — including whether new_name defaults or overwrites — are left entirely undefined.

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 concrete verb and transformation ('Flatten a tensor into a table') and reinforces it with a worked shape example (time x lat x lon -> time rows x gridpoint columns). An agent can picture the output shape exactly. It stops short of naming the inverse siblings (tensorize, tensor_from_wide), so differentiation is inferred from the shape mapping rather than stated.

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

Usage Guidelines4/5

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

Gives a clear operational sequence: select/reduce are applied first, then the result can be handed to describe/project/cluster like any table. This tells the agent where the tool sits in a pipeline and which siblings to chain. It offers no explicit when-not-to-use guidance or pointer to the inverse tool.

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