Skip to main content
Glama

interpolate_calc

Read-onlyIdempotent

Computes the y value for a given x via linear interpolation or extrapolation between two points.

Instructions

Linear interpolation (or extrapolation) between two points. Returns the y value for a given x.

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": {
      "x1": "<x1>",
      "y1": "<y1>",
      "x2": "<x2>",
      "y2": "<y2>",
      "x": "<x>"
    },
    "name": "interpolate_calc"
  }
}

Input Schema

NameRequiredDescriptionDefault
xYesX value to interpolate at.
x1YesX coordinate of first point.
x2YesX coordinate of second point.
y1YesY coordinate of first point.
y2YesY coordinate of second point.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, and non-destructive, so the safety profile is covered. The description adds the genuinely useful note that it also extrapolates outside the given range, but says nothing about the degenerate case (x1 == x2) or precision/rounding behavior.

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?

Two tight sentences with the operation front-loaded and the return value stated second. Zero filler.

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?

For a simple pure-math tool with full schema coverage and complete write-safety annotations, the description covers what it does and what it returns. The only gap is the degenerate-point behavior, which is minor.

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% and each of the five parameters is documented in-schema, so the baseline of 3 applies. The description adds no syntax or constraint detail beyond that.

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?

A specific verb ('Linear interpolation or extrapolation') plus a precise resource (two points, returns y for a given x). An agent can immediately tell what it computes; only the differentiation from siblings like spline_interpolate is left implicit.

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 math described, but there is no explicit when-to-use or when-to-prefer-alternatives guidance (e.g. versus spline_interpolate for non-linear data). An agent must infer the selection criterion.

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

Deploy Server

Other Tools