Skip to main content
Glama
es3154

Turf-MCP

by es3154

transformation_buffer

Create buffer polygons around GeoJSON features with specified radius and customizable options for spatial analysis in geographic applications.

Instructions

为 GeoJSON 特征创建缓冲区。

此功能为输入的 GeoJSON 特征创建指定半径的缓冲区多边形。

Args: geojson: GeoJSON 特征 - 类型: str (JSON 字符串格式的 GeoJSON) - 格式: 任何有效的 GeoJSON 对象 - 坐标系: WGS84 (经度在前,纬度在后) - 示例: '{"type": "Feature", "geometry": {"type": "Point", "coordinates": [-90.548630, 14.616599]}}'

radius: 缓冲区半径
    - 类型: float
    - 描述: 缓冲区的半径值
    - 示例: 500.0

options: 可选参数配置
    - 类型: str (JSON 字符串) 或 None
    - 可选字段:
        - units: 距离单位 (默认: 'kilometers')
            - 有效值: 'miles', 'nauticalmiles', 'kilometers', 'meters', 'yards', 'feet', 'inches'
        - steps: 缓冲区边界分段数 (默认: 64)
    - 示例: '{"units": "miles", "steps": 32}'

Returns: str: JSON 字符串格式的缓冲区 GeoJSON Polygon 特征 - 类型: GeoJSON Feature with Polygon geometry - 格式: {"type": "Feature", "geometry": {"type": "Polygon", "coordinates": [...]}} - 示例: '{"type": "Feature", "geometry": {"type": "Polygon", "coordinates": [[[-90.55, 14.62], ...]]}}'

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

Example: >>> import asyncio >>> geojson = '{"type": "Feature", "geometry": {"type": "Point", "coordinates": [-90.548630, 14.616599]}}' >>> options = '{"units": "miles"}' >>> result = asyncio.run(buffer(geojson, 500.0, options)) >>> print(result) '{"type": "Feature", "geometry": {"type": "Polygon", "coordinates": [[[-90.55, 14.62], ...]]}}'

Notes: - 输入参数 geojson 和 options 必须是有效的 JSON 字符串 - 坐标顺序为 [经度, 纬度] (WGS84 坐标系) - 可以为点、线、多边形等几何类型创建缓冲区 - 依赖于 Turf.js 库和 Node.js 环境

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
geojsonYes
radiusYes
optionsNo
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 by disclosing key behavioral traits: it specifies the coordinate system (WGS84 with longitude-first), notes dependency on Turf.js and Node.js environment, describes error conditions (JavaScript execution failure, timeout, input format errors), and explains the return format. However, it doesn't mention performance characteristics, rate limits, or authentication requirements.

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 structured with clear sections (Args, Returns, Raises, Example, Notes), but it's quite lengthy with detailed parameter explanations. While all content is valuable given the lack of schema descriptions, it could be more front-loaded with the core purpose before diving into parameter details. Some redundancy exists in the example section.

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

Completeness4/5

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

For a 3-parameter tool with no annotations and no output schema, the description provides excellent completeness. It covers input requirements, return format, error conditions, dependencies, and includes a practical example. The main gap is lack of usage guidelines compared to sibling tools, but otherwise it gives the agent sufficient information to invoke 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?

Given 0% schema description coverage, the description fully compensates by providing comprehensive parameter documentation. It details all three parameters (geojson, radius, options) with types, formats, coordinate systems, examples, optional fields with defaults, and valid enum values for units. This adds substantial meaning beyond the bare 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 specific action ('创建缓冲区' - create buffer) on a specific resource ('GeoJSON 特征' - GeoJSON feature). It distinguishes itself from sibling tools by focusing on buffer creation rather than other geometric operations like transformation, aggregation, or measurement listed in the sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. While it mentions it can buffer points, lines, and polygons, it doesn't specify use cases or compare it to similar transformation tools like transformation_bboxClip or transformation_circle in the sibling list. There are no explicit when/when-not instructions or named alternatives.

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