Skip to main content
Glama

gradient

Compute the vector of partial derivatives of a scalar expression with respect to specified variables for symbolic math and vector calculus.

Instructions

Compute the gradient of a scalar expression with respect to the given variables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exprYes
variablesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It does not disclose whether the result is symbolic or numeric, the return form (a vector of expressions), ordering of components, or any error behavior for non-scalar input. For a tool with zero annotation coverage this is a substantial gap.

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?

A single well-formed sentence with the operation front-loaded and no filler. It is appropriately brief, though brevity here edges toward under-specification rather than genuine conciseness.

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

Completeness2/5

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

With no output schema, no annotations, and 0% parameter documentation, the description should explain the return value (component ordering, symbolic vs numeric) and input constraints. None of that is present, leaving an agent unable to predict the tool's output.

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 description coverage is 0%, so the description must compensate, and it does partially: 'scalar expression' constrains the expr parameter and 'with respect to the given variables' explains the variables list. However, it adds no detail on expression syntax, whether variables must appear in expr, or ordering of the output, so it only partially covers the 2 undocumented params.

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 mathematical verb+resource ('compute the gradient of a scalar expression') and names the inputs it operates on. An agent can distinguish it from laplacian/divergence/curl by the operator name alone, but the description never explicitly routes among these sibling operators, so it falls short of a 5.

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

Usage Guidelines2/5

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

There is no guidance on when to choose gradient versus the many adjacent symbolic/vector-calculus siblings (laplacian, divergence, curl, symbolic_calculus). No prerequisites, no input constraints, no exclusions are stated.

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