Skip to main content
Glama
es3154

Turf-MCP

by es3154

unit_conversion_toWgs84

Convert Web Mercator projection coordinates (EPSG:3857) to WGS84 geographic coordinates for accurate geospatial mapping and analysis.

Instructions

将墨卡托投影坐标转换为地理坐标。

此功能将Web墨卡托投影坐标(EPSG:3857)转换为WGS84地理坐标。

Args: geojson: GeoJSON对象 - 类型: str (JSON 字符串格式的 GeoJSON) - 格式: 任何有效的 GeoJSON 对象(墨卡托投影坐标) - 示例: '{"type": "Point", "coordinates": [-8385846.33, 4852834.51]}'

Returns: str: JSON 字符串格式的WGS84地理坐标 GeoJSON - 类型: 相同的 GeoJSON 类型,但坐标为WGS84地理坐标 - 格式: {"type": "Point", "coordinates": [lng, lat]} - 示例: '{"type": "Point", "coordinates": [-75.343, 39.984]}'

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

Example: >>> import asyncio >>> geojson = '{"type": "Point", "coordinates": [-8385846.33, 4852834.51]}' >>> result = asyncio.run(toWgs84(geojson)) >>> print(result) '{"type": "Point", "coordinates": [-75.343, 39.984]}'

Notes: - 输入坐标必须是Web墨卡托投影坐标(EPSG:3857) - 输出坐标为WGS84地理坐标(经度/纬度) - 常用于坐标系统转换 - 依赖于 Turf.js 库和 Node.js 环境

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
geojsonYes
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 the tool's behavior: it converts coordinates, specifies input/output formats, mentions dependencies (Turf.js and Node.js), and lists error conditions (JavaScript execution failure, timeout, or incorrect input data). This covers key aspects like transformation logic, error handling, and technical dependencies, though it lacks details on performance or 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.

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), making it easy to navigate. It is appropriately sized with no redundant information. However, some sections like the example could be slightly more concise, but overall, it efficiently conveys necessary details without waste.

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 (coordinate transformation), no annotations, 0% schema coverage, and no output schema, the description provides complete context. It explains the transformation process, input/output formats, examples, error handling, dependencies, and usage notes. This covers all essential aspects for an AI agent to understand and use the 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 fully compensate. It provides comprehensive parameter semantics: defines 'geojson' as a JSON string in GeoJSON format with Mercator coordinates, gives an example, and specifies the coordinate system (EPSG:3857). This adds significant meaning beyond the basic schema, ensuring the parameter is well-understood.

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: '将墨卡托投影坐标转换为地理坐标' (converts Mercator projection coordinates to geographic coordinates). It specifies the exact transformation (EPSG:3857 to WGS84) and distinguishes itself from sibling tools like 'unit_conversion_toMercator' which performs the inverse operation, making the purpose specific and differentiated.

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: for converting Web Mercator coordinates to WGS84 geographic coordinates. It mentions '常用于坐标系统转换' (commonly used for coordinate system conversion), which gives general usage context. However, it does not explicitly state when not to use it or name specific alternatives, though the sibling list suggests related tools like 'unit_conversion_toMercator'.

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