Skip to main content
Glama
es3154

Turf-MCP

by es3154

coordinate_mutation_round_number

Round numbers to specified decimal places for precision control in geospatial calculations. This Turf-MCP tool processes coordinates by adjusting numerical accuracy for spatial data analysis.

Instructions

对数字进行四舍五入,控制小数位数。

此功能将数字四舍五入到指定的小数位数,用于精确控制数值的精度。

Args: num: 要四舍五入的数字 - 类型: float - 范围: 任意浮点数 - 示例: 120.4321

precision: 小数位数精度
    - 类型: int
    - 描述: 要保留的小数位数
    - 默认: 0
    - 范围: 0 或正整数
    - 示例: 2

Returns: str: JSON 字符串格式的四舍五入结果对象 - 类型: 包含 value 的对象 - 格式: {"value": 四舍五入后的数值} - 示例: '{"value": 120.43}'

Raises: Exception: 当 JavaScript 执行失败、超时或输入数据格式错误时抛出异常

Example: >>> import asyncio >>> result = asyncio.run(round_number(120.4321, 2)) >>> print(result) '{"value": 120.43}'

Notes: - 如果未提供精度参数,默认四舍五入到整数 - 精度为 0 时返回整数 - 依赖于 Turf.js 库和 Node.js 环境

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numYes
precisionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries full burden and adds valuable behavioral context: it specifies the return format (JSON string with a 'value' object), notes default behavior (precision=0 for integer rounding), and mentions dependencies (Turf.js, Node.js) and error conditions (JavaScript failures, timeouts, input errors). However, it doesn't detail performance aspects like rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized but not optimally structured: it front-loads the purpose, but includes verbose sections like 'Args', 'Returns', 'Raises', 'Example', and 'Notes' that could be streamlined. Some redundancy exists (e.g., repeating precision details), reducing efficiency.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (2 parameters, no nested objects), no annotations, and an output schema present, the description is complete: it covers purpose, parameters, return values, errors, examples, and dependencies. The output schema handles return structure, so the description needn't explain it further.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description compensates fully by providing detailed parameter semantics: it explains 'num' as the number to round with type, range, and example, and 'precision' as decimal places with type, description, default, range, and example. This adds meaning beyond the basic schema.

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 clearly states the tool's purpose with specific verbs ('四舍五入', '控制小数位数') and resources ('数字'), distinguishing it from siblings like coordinate_mutation_clean_coords or coordinate_mutation_truncate. It explicitly defines the mathematical rounding operation, making its function unambiguous.

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 description implies usage through the 'Args' and 'Example' sections, suggesting it's for numerical precision control, but lacks explicit guidance on when to use this tool versus alternatives (e.g., coordinate_mutation_truncate for truncation). No when-not-to-use or prerequisite information is provided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/es3154/turf-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server