Skip to main content
Glama
es3154

Turf-MCP

by es3154

random_randomPosition

Generate random geographic coordinates within a specified bounding box or globally. Returns longitude and latitude values for mapping, testing, or simulation purposes.

Instructions

生成随机的地理坐标位置。

此功能在指定的边界框内随机生成一个地理坐标位置,返回经度和纬度坐标。

Args: bbox: 边界框数组 - 类型: str (JSON 字符串格式的数组) 或 None - 格式: [minX, minY, maxX, maxY] - 默认: [-180, -90, 180, 90] (全球范围) - 示例: '[-180, -90, 180, 90]'

Returns: str: JSON 字符串格式的坐标位置数组 - 类型: 数组 [经度, 纬度] - 格式: [lng, lat] - 示例: '[-75.343, 39.984]'

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

Example: >>> import asyncio >>> bbox = '[-180, -90, 180, 90]' >>> result = asyncio.run(randomPosition(bbox)) >>> print(result) '[-75.343, 39.984]'

Notes: - 输入参数 bbox 必须是有效的 JSON 字符串或 None - 坐标顺序为 [经度, 纬度] (WGS84 坐标系) - 如果未指定边界框,默认在全球范围内生成随机位置 - 依赖于 Turf.js 库和 Node.js 环境

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bboxNo

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 does well. It discloses that the tool returns coordinates in [lng, lat] format, uses WGS84 coordinate system, has a default global bounding box, and depends on Turf.js and Node.js. It also mentions potential exceptions for JavaScript execution failures, timeouts, or input format errors. The only gap is lack of information about randomness characteristics or performance.

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 with the core purpose. However, it includes some implementation details (Turf.js, Node.js) that may not be essential for tool selection, and the Python example might be overly specific for an MCP context. Overall efficient but could be slightly more concise.

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?

For a single-parameter tool with no annotations but with output schema, the description is remarkably complete. It covers purpose, parameter semantics, return format, error conditions, examples, and implementation dependencies. The output schema exists, so the description appropriately focuses on explaining the coordinate format rather than duplicating schema information. Nothing essential appears missing.

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 - which it does excellently. It provides detailed semantics for the single parameter 'bbox': format requirements (JSON string array [minX, minY, maxX, maxY]), default value (global [-180, -90, 180, 90]), examples, and validation rules (must be valid JSON or None). This goes far beyond what the minimal schema provides.

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: '生成随机的地理坐标位置' (generate random geographic coordinate positions). It specifies the verb ('生成随机' - generate random) and resource ('地理坐标位置' - geographic coordinate positions), and distinguishes itself from siblings like random_randomPoint or random_randomPolygon by focusing specifically on coordinate generation rather than geometric features.

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 about when to use this tool: when needing random geographic coordinates within a bounding box. It mentions the default global range and the coordinate system (WGS84). However, it doesn't explicitly contrast with alternatives like random_randomPoint (which generates random point features rather than raw coordinates) or specify when not to use it.

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