Skip to main content
Glama

math.integrate_gauss_legendre

Read-onlyIdempotent

Compute an approximate definite integral of an expression over [a,b] using Gauss-Legendre quadrature; set degree and variable, suitable for smooth integrands.

Instructions

가우스-르장드르 구적법(mpmath.quadgl)으로 정적분 ∫_a^b f(x) dx 의 근삿값을 구한다. expression 은 core.calc 문법, a 와 b 는 a < b 인 Decimal 문자열, degree 는 2 이상 100 이하(기본 20). 피적분 함수는 float64 로 평가하고 결과는 유효숫자 12자리다. 매끄러운 함수에 적합하며 불연속이 있는 구간은 나누어 적분한다.

Input Schema

NameRequiredDescriptionDefault
aYes
bYes
degreeNo
variableNox
expressionYes

Output Schema

NameRequiredDescriptionDefault
_metaNo서버가 붙이는 영수증(integrity), 엔진, 힌트
traceYes계산 근거(tool, formula, inputs, steps, output)
degreeYes
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.6/5.0
Behavior5/5

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

Because annotations already cover the safety profile (readOnlyHint, idempotentHint, openWorldHint=false), the description adds genuinely useful numeric context: the integrand is evaluated in float64, the result carries 12 significant digits, the constraint a < b is stated, and the backend is identified (mpmath.quadgl).

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?

Four dense sentences, front-loaded with the method and formula, then constraints, then precision, then applicability. Every sentence carries information that the agent cannot get from structured fields.

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 an output schema present, return-value explanation is unnecessary, and the description covers method, precision, domain, and most parameters. The only shortfall is the undocumented `variable` parameter, which matters for a symbolic-integration tool.

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 coverage is 0%, so the description must carry the burden, and it does so for 4 of 5 parameters: expression syntax (core.calc), a/b as Decimal strings with a < b, and degree's range (2–100, default 20). The `variable` parameter (default 'x') is never mentioned, which is the one remaining gap.

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 a specific verb and resource: computing an approximate definite integral via Gauss-Legendre quadrature (mpmath.quadgl). It also states the exact mathematical form (∫_a^b f(x) dx), which clearly distinguishes it from the sibling math.integrate_simpson.

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?

It gives a clear use condition ('적합하며 매끄러운 함수') and the fallback behavior for non-smooth inputs ('불연속이 있는 구간은 나누어 적분한다'). It does not explicitly name the alternative sibling tool (e.g., integrate_simpson), so there is room for improvement, but the when/when-not guidance is clear enough.

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