Skip to main content
Glama
es3154

Turf-MCP

by es3154

interpolation_planepoint

Calculate the interpolated z-value for a point within a triangular plane using three vertices' z-values. This tool processes GeoJSON point and triangle polygon features to determine elevation or depth values at specific locations.

Instructions

计算点在三角形平面上的z值。

此功能根据三角形三个顶点的z值,计算给定点在三角形平面上的插值z值。

Args: point: 点特征 - 类型: str (JSON 字符串格式的 GeoJSON Feature) - 格式: Feature with Point geometry - 示例: '{"type": "Feature", "geometry": {"type": "Point", "coordinates": [-75.3221, 39.529]}}'

triangle: 三角形特征
    - 类型: str (JSON 字符串格式的 GeoJSON Feature)
    - 格式: Feature with Polygon geometry (必须包含三个顶点)
    - 示例: '{"type": "Feature", "geometry": {"type": "Polygon", "coordinates": [[[-75.1221, 39.57], [-75.58, 39.18], [-75.97, 39.86], [-75.1221, 39.57]]]}, "properties": {"a": 11, "b": 122, "c": 44}}'

Returns: str: JSON 字符串格式的z值结果 - 类型: 包含 value 的对象 - 格式: {"value": z值} - 示例: '{"value": 35.5}'

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

Example: >>> import asyncio >>> point = '{"type": "Feature", "geometry": {"type": "Point", "coordinates": [-75.3221, 39.529]}}' >>> triangle = '{"type": "Feature", "geometry": {"type": "Polygon", "coordinates": [[[-75.1221, 39.57], [-75.58, 39.18], [-75.97, 39.86], [-75.1221, 39.57]]]}, "properties": {"a": 11, "b": 122, "c": 44}}' >>> result = asyncio.run(planepoint(point, triangle)) >>> print(result) '{"value": 35.5}'

Notes: - 输入参数 point 和 triangle 必须是有效的 JSON 字符串 - 坐标顺序为 [经度, 纬度] (WGS84 坐标系) - 三角形必须包含三个顶点,且首尾坐标相同形成闭合环 - 三角形属性'a', 'b', 'c'分别对应三个顶点的z值 - 依赖于 Turf.js 库和 Node.js 环境

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pointYes
triangleYes

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 discloses key behavioral traits: it specifies input data formats (JSON strings, GeoJSON features), coordinate system (WGS84), triangle requirements (three vertices, closed loop), dependency on Turf.js and Node.js, and error conditions (JavaScript failures, timeouts, data format errors). It does not mention performance or rate limits, but covers essential operational context.

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 sections (Args, Returns, Raises, Example, Notes), front-loading the purpose. It is appropriately sized but includes some redundancy (e.g., repeating JSON string format in multiple sections). Most sentences earn their place by providing critical information, though it could be slightly more streamlined.

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 complexity (interpolation with specific geometric constraints), no annotations, and an output schema exists (implied by Returns section), the description is complete enough. It covers input requirements, output format, errors, examples, and environmental dependencies, providing all necessary context for an agent to use the tool correctly without needing additional structured data.

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 adds detailed meaning beyond the basic schema: it explains that 'point' and 'triangle' are JSON strings in GeoJSON format, provides examples, specifies geometry types (Point for point, Polygon for triangle), notes coordinate order [longitude, latitude], and describes triangle properties ('a', 'b', 'c' as z-values). This comprehensively documents both parameters.

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 verb ('计算' - calculate) and resource ('点在三角形平面上的z值' - z-value of a point on a triangle plane). It distinguishes from siblings by focusing on interpolation within a triangle plane rather than other geometric operations like boolean checks, measurements, or transformations 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 Guidelines3/5

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

The description implies usage through the example and notes (e.g., for interpolation on a triangle plane with specific data formats), but does not explicitly state when to use this tool versus alternatives like 'interpolation_interpolate' or 'interpolation_tin' from the sibling list. It provides context on data requirements but lacks direct comparative guidance.

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