Skip to main content
Glama

derive

Compute net totals across transaction types in a single call by summing signed sums of a quantity column, with per-component breakdown and warnings for unmatched conditions.

Instructions

Computes a NET value over transaction types in one call: sum of sign * groupwise_sum(quantity_col) across the given components. This is how a stock figure like receipts + purchases − consumption − returns becomes ONE call with the arithmetic done in pandas, instead of five filter_sheet calls added up in your head (which RULE 3 forbids).

components is a list of {"conditions": {...same grammar as filter_sheet...}, "sign": 1 or -1, "label": "receipts"} conditions (optional) pre-filters the sheet before any component applies. The response includes a per-component breakdown with rows_matched. A component that matched ZERO rows is flagged and warned about — check the spelling of the transaction type before trusting the net.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sheetYes
group_byYes
file_nameYes
componentsYes
conditionsNo
folder_pathNo
quantity_colYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that computation is done in pandas, includes a per-component breakdown with rows_matched, and flags zero-match components with a warning. It does not explicitly state that the operation is read-only (no file modification), but given its nature and the context, that is a minor omission. Overall, it provides strong behavioral safeguards beyond a simple summary.

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?

The description is compact but rich. It front-loads the core purpose, then provides an example, breaks down the components structure, and adds a critical warning. A few words are slightly repetitive ('one call' appears twice), but each sentence adds value and the structure is logical, so it earns a high score without being overly verbose.

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?

The tool has 7 parameters and is genuinely complex, but the description covers the main behavioral contract: the net computation, component structure, optional conditions, and output warnings. It doesn't elaborate on folder_path or file_name, but those are self-explanatory. Given the output schema exists (per context signals), the description does not need to explain return values in detail. This is fairly complete for a tool of this complexity.

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

Parameters5/5

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

Schema coverage is 0%, so the description is the only source of parameter meaning. It thoroughly explains the complex 'components' list (conditions, sign, label), clarifies 'conditions' as optional pre-filter, and ties 'quantity_col' to the groupwise_sum. This goes well beyond the bare schema and compensates entirely for the lack of schema descriptions.

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?

The description uses a specific verb ('Computes') and clearly defines the resource ('NET value over transaction types'). It explicitly contrasts with filter_sheet by showing how it replaces five calls, which strongly distinguishes it from siblings. This is a textbook example of purpose clarity.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool: to compute a net figure from signed components in one call, and tells the agent to avoid multiple filter_sheet calls (citing RULE 3). It names the alternative filter_sheet and implies that the tool is the right choice for this pattern. No exclusion criteria are missing; it is very clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Karunya-Muddana/ExcelMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server