Skip to main content
Glama

ScorpTech x402 Tools

Cosine Law

cosine_law
Read-onlyIdempotent

The cosine of the angle opposite side c, as a reduced rational (a^2+b^2-c^2)/(2ab). The sides must form a strict triangle. A right angle returns 0. Returns JSON with: cos. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/cosine-law

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": {
      "a": "<a>",
      "b": "<b>",
      "c": "<c>"
    },
    "name": "cosine_law"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYes
bYes
cYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description adds genuinely useful behavior: the edge case that a right angle yields 0, the reduced-rational output form, the per-call price of $0.001 USDC via x402, and a mirrored HTTPS endpoint. It does not disclose the error behavior when the sides violate the triangle inequality, which is the main remaining gap.

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?

Compact and front-loaded: the mathematical definition and validity constraint come first, then the return shape, then payment and endpoint logistics. Every sentence carries information an agent needs to call the tool, with no 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?

With no output schema, the description correctly specifies the return payload ('Returns JSON with: cos'), and for a three-integer pure function that plus the formula is nearly sufficient. The omission of failure behavior for invalid triangles and of an output type for the rational keeps it from being fully complete.

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 description coverage is 0%, so the description must carry the parameter meaning, and it does: a, b, c are sides, with c explicitly the side opposite the target angle and a, b the adjacent sides, conveyed through the formula. Numeric bounds are left to the schema, which handles them adequately.

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 mathematical operation with the exact formula (a^2+b^2-c^2)/(2ab) and identifies which geometric quantity is returned (the cosine of the angle opposite side c). An agent can distinguish this from sibling math utilities like ohm_law without opening the schema.

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

Usage Guidelines4/5

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

The precondition 'The sides must form a strict triangle' tells the agent when the call is valid, which is meaningful usage guidance for a computational tool. It does not explicitly name an alternative (e.g., a sine-law or inverse-cosine tool) or state what to do when the constraint fails, so it stops short of full routing guidance.

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