Skip to main content
Glama

vector_calculus_operation

Idempotent

Compute gradient, divergence, curl, or Laplacian of scalar and vector fields symbolically. Solve vector calculus problems using SageMath.

Instructions

Vector calculus operations: gradient, divergence, curl, laplacian

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionNoWorkspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the same workspace across reconnects and is a bearer credential -- keep it secret. Omit for 'default'.default
operationYesOne of: gradient, divergence, curl, laplacian
variablesNoVariable names (e.g. ['x', 'y', 'z'])
expressionYesScalar field (string) for gradient/laplacian, or vector field components (list) for divergence/curl

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.0
    • changedInput schema / properties / session / description
      Previous value: -"Named workspace to use. Workspaces have independent variables; omit for 'default'."New value: +"Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the same workspace across reconnects and is a bearer credential -- keep it secret. Omit for 'default'."
  2. Changed1 schema field changedv0.5.0
    • addedInput schema / properties / session
      Added value: +{
      +  "default": "default",
      +  "description": "Named workspace to use. Workspaces have independent variables; omit for 'default'.",
      +  "type": "string"
      +}
  3. First observedv0.3.1

TDQS

B3.4/5.0
Behavior2/5

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

Annotations provide idempotentHint=true, destructiveHint=false, openWorldHint=false, and readOnlyHint=false, so the safety profile is already largely covered. The description adds no behavioral context beyond the operation names: it does not mention session/workspace side effects, permissions, or what occurs when readOnlyHint is false. With annotations carrying the safety burden, this adds nothing extra.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single front-loaded sentence with zero wasted words, and the operation list is immediately useful. It is appropriately sized for a schema-rich tool with an output schema.

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?

Given 100% schema description coverage, an output schema, and annotations, the description need not explain return values or parameter formats. It states the available operations clearly, though it could be more complete by clarifying when to choose this tool over sibling symbolic-math tools.

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 100%, so the schema already documents parameter meanings and formats. The description adds no parameter semantics beyond what the schema provides. A baseline of 3 is appropriate when the schema does the heavy lifting and the description does not compensate.

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 explicitly states the tool performs vector calculus operations and enumerates the four available operations (gradient, divergence, curl, laplacian). This is clear and specific, but it does not differentiate the tool from sibling mathematical operations such as differentiate_expression or integrate_expression.

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?

Listing the operations implies when the tool is appropriate, but there is no explicit guidance on when to use it versus alternatives, no prerequisites, and no exclusions. The usage is inferable from the operation names, which matches a 3.

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