Skip to main content
Glama
es3154

Turf-MCP

by es3154

unit_conversion_lengthToDegrees

Convert ground distance measurements to angular degrees for geographic coordinate calculations. This tool transforms length units (meters, kilometers, miles, etc.) into degrees based on Earth's radius, enabling spatial analysis and distance representation in angular units.

Instructions

将长度转换为角度距离。

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

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

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

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

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

Example: >>> import asyncio >>> result = asyncio.run(lengthToDegrees(100.0, 'kilometers')) >>> print(result) '{"value": 0.9, "units": "degrees"}'

Notes: - 基于地球半径计算角度距离 - 转换公式: 角度 = 距离 / (地球半径 × π / 180) - 常用于地理坐标计算 - 依赖于 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 the full burden of behavioral disclosure. It effectively describes key behaviors: the conversion formula ('转换公式: 角度 = 距离 / (地球半径 × π / 180)'), dependencies ('依赖于 Turf.js 库和 Node.js 环境'), error conditions ('Raises: Exception: 当 JavaScript 执行失败、超时或输入数据格式错误时抛出异常'), and the return format ('Returns: str: JSON 字符串格式的角度结果'). It lacks details on rate limits or authentication needs, but covers essential operational aspects well.

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?

The description is well-structured with clear sections (Args, Returns, Raises, Example, Notes) and front-loaded purpose. It is appropriately sized for a tool with two parameters and complex behavior, though the example and notes sections are somewhat verbose. Every sentence adds value, such as explaining the formula and dependencies, but it could be slightly more concise in the notes.

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 complexity (involving geographic calculations and external dependencies), no annotations, and no output schema, the description is highly complete. It covers purpose, parameters, return format, errors, examples, and implementation details (formula, dependencies). This provides all necessary context for an agent to invoke the tool correctly without relying on structured fields.

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?

Given 0% schema description coverage, the description fully compensates by providing detailed parameter semantics. It explicitly documents both parameters: 'distance' with type, description, and example, and 'units' with type, description, valid values, default, and example. This adds significant meaning beyond the minimal input schema, ensuring the agent understands how to use the parameters correctly.

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 angular distance). It specifies the exact transformation (ground distance to angular distance based on Earth's radius) and distinguishes itself from sibling tools like 'unit_conversion_convertLength' or 'unit_conversion_radiansToLength' by focusing specifically on length-to-degrees conversion for geographic calculations.

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 geographic coordinate calculations). It implies usage in geographic contexts but does not explicitly state when not to use it or name specific alternatives among the many sibling unit conversion tools, such as 'unit_conversion_lengthToRadians' for a similar conversion to radians instead of degrees.

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