Skip to main content
Glama

Approveit

Analyze a field across requests

analyze_field
Read-only

Aggregate any workflow field across the requests this user can see, as a database aggregate rather than by listing requests and adding them up. Numeric fields support sum/average/max/min; any field supports rank (the most common values and their counts). group_by_label cross-tabulates two fields on the same request: field_label='Amount', operation='sum', group_by_label='Vendor' answers 'what did we spend per vendor'. dimension groups by a built-in property instead — status, workflow, requestor, or day/week/month for volume over time. Works on LINE-ITEM columns as well as ordinary fields, and pairs cells from the same line, so 'spend on laptops' is answerable. Refer to fields by the label shown on the form; use get_workflow_details if unsure of the exact wording. Read note before quoting money — currency fields are stored in MINOR units — and repeat any warnings rather than presenting a truncated breakdown as complete.

Input Schema

NameRequiredDescriptionDefault
dimensionNoBreak requests down by a BUILT-IN property instead of a workflow field. `month`, `week` and `day` give volume over time — that is what 'a graph of requests over the past year' means. `status`, `workflow` and `requestor` give the mix. Pass this OR `field_label`, not both.
operationNo`rank` counts requests per value and works on every field. The rest need a numeric field.rank
field_labelNoThe field to analyse, named as a person would say it — 'Country', 'Amount', 'Storage size', 'Item'. Use this for anything a WORKFLOW defines. For built-in properties of a request, use `dimension`.
created_afterNoOnly requests submitted on/after this date (YYYY-MM-DD).
field_filtersNoNarrow to requests whose FIELD VALUES match, by the field's name on the form. This is how you answer 'invoices from Acme', 'requests where Country is Germany', or 'which requests have a laptop on them' — the last one works because line-item table columns are matched too, not just fields on the form itself. Combine freely with the other filters; several entries all have to match the same request. Prefer this over `search` when the user names a field and a value, because `search` is free text over the whole request and will also match a mention in a description. Use `get_workflow_details` if unsure what a workflow calls a field.
created_beforeNoOnly requests submitted on/before this date (YYYY-MM-DD).
group_by_labelNoOptional second field to break the result down by — 'sum of Amount grouped by Country' gives spend per country. Only meaningful with a numeric operation.
workflow_queryNoOptional workflow-name substring. Scoping to one workflow makes the answer exact, because a label can mean different things in different workflows.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the read-only annotations, the description discloses important behavior: aggregation happens in the database, line-item columns are analyzed with same-line cell pairing, currency values are stored in minor units, and returned note and warnings fields must be read and repeated. These are exactly the behavioral details an agent needs before trusting or quoting results.

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 front-loaded with the core purpose and then gives concrete usage examples, warnings, and field-label guidance. It is dense and slightly repetitive with the schema on group_by_label and dimension, but nearly every sentence adds operational value for a complex 8-parameter tool.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex aggregation tool with no output schema, the description covers the essential context: aggregation method, supported operations, grouping modes, line-item handling, field labeling, currency units, and warning behavior. An agent can call this tool correctly without needing additional return-value documentation.

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 already 100%, so the baseline is 3, but the description adds useful semantic examples beyond the schema, such as field_label='Amount', operation='sum', group_by_label='Vendor' meaning spend per vendor, and dimension 'month' meaning volume over time. It also clarifies when to use field_label versus dimension in prose, though much of this is already present in the schema.

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 states a specific verb and resource: it aggregates workflow fields across visible requests as a database aggregate rather than by listing and summing requests. It clearly distinguishes itself from listing requests and from free-text search, and it names get_workflow_details as the fallback for uncertain field labels.

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?

It gives explicit operating rules: numeric fields support sum/average/max/min, any field supports rank, group_by_label cross-tabulates two fields, and dimension groups by built-in properties such as status or month. It also routes the agent to get_workflow_details when field wording is unclear, which is a concrete alternative behavior.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources