Skip to main content
Glama
es3154

Turf-MCP

by es3154

unit_conversion_lengthToRadians

Convert ground distance measurements to radians for spherical geometry calculations. This tool transforms miles, kilometers, meters, or other length units into angular distances based on Earth's radius, enabling accurate geographic computations.

Instructions

将长度转换为弧度距离。

此功能将地面距离转换为对应的弧度距离(基于地球半径)。

Args: distance: 距离值 - 类型: float - 描述: 要转换的距离数值 - 示例: 100.0

units: 距离单位
    - 类型: str
    - 描述: 输入距离的单位
    - 有效值: 'miles', 'nauticalmiles', 'kilometers', 'meters', 'yards', 'feet', 'inches'
    - 默认: 'kilometers'
    - 示例: 'kilometers'

Returns: str: JSON 字符串格式的弧度结果 - 类型: 包含 value 和 units 的对象 - 格式: {"value": 弧度数值, "units": "radians"} - 示例: '{"value": 0.0157, "units": "radians"}'

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

Example: >>> import asyncio >>> result = asyncio.run(lengthToRadians(100.0, 'kilometers')) >>> print(result) '{"value": 0.0157, "units": "radians"}'

Notes: - 基于地球半径计算弧度距离 - 常用于球面几何计算 - 依赖于 Turf.js 库和 Node.js 环境

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
distanceYes
unitsNokilometers
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 does well. It discloses key behavioral traits: the calculation is based on Earth's radius, it returns JSON string format, it depends on Turf.js and Node.js environment, and it raises exceptions for JavaScript execution failures, timeouts, or input format errors. This covers important operational context beyond basic functionality.

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?

The description is well-structured with clear sections (Args, Returns, Raises, Example, Notes) and every sentence adds value. It's appropriately sized for a tool with 2 parameters and no annotations, with no redundant information. The structure helps quickly locate key information.

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 moderate complexity (2 parameters, no output schema, no annotations), the description is complete. It explains what the tool does, how to use parameters, what it returns (including format and example), error conditions, dependencies, and typical use cases. No significant gaps exist for understanding and invoking this tool correctly.

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?

Schema description coverage is 0%, so the description must compensate fully. It provides detailed parameter information: 'distance' is a float value with an example, 'units' is a string with valid values, default value, and example. This adds complete meaning beyond the bare schema, effectively documenting both parameters with type, description, constraints, and examples.

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: '将长度转换为弧度距离' (convert length to radian distance) with specific context of being based on Earth's radius. It distinguishes from sibling tools like 'unit_conversion_convertLength' (general length conversion) and 'unit_conversion_lengthToDegrees' (converts to degrees instead of radians), making the scope and differentiation explicit.

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 description provides clear context for when to use this tool: '常用于球面几何计算' (commonly used for spherical geometry calculations). It doesn't explicitly state when not to use it or name alternatives, but the context is sufficient for understanding its application domain. No misleading guidance is present.

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