Skip to main content
Glama

Math Solve

math_solve

中小学数学求解器,支持五类问题(结果尽量给出分数/根式精确形式+小数近似):① kind='quadratic' 一元二次方程求根:传 expr 如 "x²-5x+6=0"、"2x^2+3x-2=0",或系数 a,b,c(ax²+bx+c=0),返回判别式 Δ 分析(两实根/重根/无实根)与精确根、复数根提示;② kind='linear2' 二元一次方程组:传 eq1/eq2 如 eq1='2x+3y=8', eq2='x-y=1',或系数 a1,b1,c1,a2,b2,c2;③ kind='combination' 组合数 C(n,k):传 n,k 或 expr='C(5,2)';④ kind='permutation' 排列数 A(n,k):传 n,k 或 expr='A(5,2)';⑤ kind='sequence' 数列:seq_type='arithmetic'/'geometric',传 first(首项)、common(公差d/公比q)、terms(项数n),返回第 n 项与前 n 项和。不传 kind 直接传 expr 可自动识别题型。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "math_solve"
  }
}

Input Schema

NameRequiredDescriptionDefault
aNo
bNo
cNo
kNo
nNo
a1No
a2No
b1No
b2No
c1No
c2No
eq1No
eq2No
exprNo表达式字符串,如 "x²-5x+6=0"、"2x+3y=8;x-y=1"、"C(5,2)"、"等差数列 a1=2,d=3,n=10"
kindNoquadratic / linear2 / combination / permutation / sequence,留空则按 expr 自动识别
firstNo
termsNo
commonNo
seq_typeNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations supplied, the description carries the disclosure burden, and it does disclose meaningful outcome behavior beyond the schema: the quadratic mode returns discriminant analysis (two real roots / double root / no real roots) with exact roots and a complex-root hint, and the sequence mode returns the nth term and partial sum. Gaps remain around failure behavior for malformed exprs, whether kind is inferred reliably, and whether extra unused parameters are silently ignored, but for a pure computation tool the coverage is solid.

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?

It is one long paragraph, but the ①–⑤ markers and parenthesized inline glosses keep it scannable, and the kind taxonomy is front-loaded so an agent can stop reading once it finds its mode. Some redundancy (both expr examples and coefficient lists for the same mode) adds length, though it earns most of 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 19-parameter, zero-required, five-mode tool with an output schema and no annotations, the description does the heavy lifting well: it explains every mode, both input styles, the auto-detect fallback, and the return semantics of the nontrivial modes. Residual gaps are the unspecified precedence between expr and the scalar parameters when both are supplied, and what the tool does when nothing parses.

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 only 11%, so the description must compensate, and it largely does — it maps essentially every parameter family: a/b/c as ax²+bx+c coefficients, a1,b1,c1,a2,b2,c2 for the linear system, n/k for C(n,k) and A(n,k), first/common/terms for the sequence, and eq1/eq2/expr/kind for string input. What it omits is constraint semantics: integer-only requirements on n/k, the n ≥ k implicit domain, and the meaning of the overlapping a/b/c both as quadratic coefficients and as a2/c2 counterparts.

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?

The description names the resource (a school-level math solver) and enumerates exactly five problem modes with the discriminating kind values (quadratic, linear2, combination, permutation, sequence), so an agent knows precisely which class of problem this covers versus chemistry_calc or physics_calc. It also states the answer format constraint (exact fraction/radical form plus decimal approximation), which is real scope information.

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?

Each of the five kinds is paired with the routing rule and a concrete call example (expr="x²-5x+6=0" or a/b/c; eq1/eq2 or a1..c2; n,k or "C(5,2)"; seq_type plus first/common/terms), and it explicitly says that omitting kind lets expr drive auto-detection. What is missing is any when-not guidance — e.g., what to do if the input matches no recognizable pattern, or when to prefer the siblings for non-arithmetic work.

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