Skip to main content
Glama

tensor_from_wide

Convert wide tables with encoded column names (e.g., AAPL_close) into an indexed tensor by splitting names on a separator, preserving column order or applying custom dimension order.

Instructions

Turn a wide table whose column names encode several keys (AAPL_close, AAPL_volume, MSFT_close, ...) into a tensor index x dims..., splitting column names on sep. dims default to ['series', 'feature']. The wide table's column order is kept for the name-derived dims (so a tenor axis 1m,3m,6m,1y,2y stays in that order); sort=True sorts naturally instead, order={dim: [...]} pins an explicit order.

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>"
    },
    "name": "tensor_from_wide"
  }
}

Input Schema

NameRequiredDescriptionDefault
sepNo_
dimsNo
nameYes
sortNo
orderNo
new_nameNo
index_dimNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does disclose one important behavior (column order is preserved unless sort=True, and order pins an explicit ordering), but says nothing about whether the source table is mutated, what happens on malformed/missing separators, or how conflicting name segments are handled. With zero annotation coverage this leaves real gaps for a reshaping operation.

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 transformation and backed by concrete examples; the ordering rules follow logically. Slightly run-on with stacked parentheticals, but every clause carries information.

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?

Return-value explanation is correctly omitted since an output schema exists, and the dim/order semantics are covered. For a 7-parameter, unannotated reshaping tool, though, the undocumented name/new_name/index_dim params and the absence of any mutation or error behavior keep it from being complete.

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 coverage is 0%, so the description must compensate, and it does explain the hardest params well: sep, dims (with its ['series','feature'] default), sort, and order. But the required 'name' parameter, plus new_name and index_dim, are never mentioned in the text and have no schema descriptions at all, leaving three of seven params opaque.

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?

States a concrete verb and resource ('Turn a wide table ... into a tensor') and immediately disambiguates the direction with sample column names (AAPL_close, AAPL_volume). An agent can tell this apart from the inverse sibling tensor_to_table without opening either schema.

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 the data shape ('a wide table whose column names encode several keys'), and the sort/order/default branches give real selection guidance among modes. However, it never says when to prefer this over tensorize, load_dataset, or tensor_transform, and no preconditions or exclusions are stated.

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