Skip to main content
Glama

midpoint_calc

Read-onlyIdempotent

Calculate the midpoint, distance, slope, and angle between two 2D points for coordinate geometry, measurement, and spatial analysis tasks.

Instructions

Calculate the midpoint, distance, slope, and angle between two 2D points.

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>"
    },
    "name": "midpoint_calc"
  }
}

Input Schema

NameRequiredDescriptionDefault
x1YesX of first point.
x2YesX of second point.
y1YesY of first point.
y2YesY of second point.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already establish readOnly, idempotent, and non-destructive, so purity and safety need no restating. The description adds that four distinct values are computed, which is useful behavior since there is no output schema, but it says nothing about edge cases such as coincident points (undefined slope/angle) or vertical segments where slope is infinite.

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?

A single front-loaded sentence with no filler, no hedging, and no repetition of the tool name. Every clause (the four computed quantities, the two-point scope) earns its place.

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 pure-arithmetic tool with full parameter documentation and no output schema, listing the four return values in the description closes the main gap. The remaining omission is degenerate-input behavior (identical or vertically aligned points), which would help an agent interpret 'slope' and 'angle' results.

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 coverage is 100%, so each of x1/y1/x2/y2 is already documented as a coordinate. The description's only added semantic is the grouping of the parameters into two points, which the schema labels convey only implicitly. Baseline 3 is correct when the schema does the heavy lifting.

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?

States a specific verb ('Calculate') plus the exact resources produced (midpoint, distance, slope, angle) between two 2D points. The enumeration of outputs distinguishes it from nearby siblings like slope_intercept, dot_product, and segment_intersection without any schema inspection.

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?

The phrase 'between two 2D points' implies the input situation (two coordinate pairs), but there is no explicit when-to-use guidance, no exclusion of degenerate cases, and no named alternative such as slope_intercept or segment_intersection for callers who only need one of the outputs.

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