Skip to main content
Glama
es3154

Turf-MCP

by es3154

misc_kinks

Detect self-intersection points in line or polygon geometries to identify kinks and return their coordinate locations.

Instructions

查找几何图形中的自相交点。

此功能检测线或多边形几何图形中的自相交点(扭结点),返回这些交叉点的位置坐标。

Args: geojson: GeoJSON 对象 - 类型: str (JSON 字符串格式的 GeoJSON) - 格式: 支持 LineString、MultiLineString、Polygon、MultiPolygon - 坐标系: WGS84 (经度在前,纬度在后) - 示例: '{"type": "Polygon", "coordinates": [[[-12.034835, 8.901183], [-12.060413, 8.899826], [-12.03638, 8.873199], [-12.059383, 8.871418], [-12.034835, 8.901183]]]}'

Returns: str: JSON 字符串格式的点特征集合 - 类型: GeoJSON FeatureCollection with Point features - 格式: {"type": "FeatureCollection", "features": [{"type": "Feature", "geometry": {"type": "Point", "coordinates": [lng, lat]}}, ...]}

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

Example: >>> import asyncio >>> polygon = '{"type": "Polygon", "coordinates": [[[-12.034835, 8.901183], [-12.060413, 8.899826], [-12.03638, 8.873199], [-12.059383, 8.871418], [-12.034835, 8.901183]]]}' >>> result = asyncio.run(kinks(polygon)) >>> print(result) '{"type": "FeatureCollection", "features": [{"type": "Feature", "geometry": {"type": "Point", "coordinates": [-12.045, 8.885]}}]}'

Notes: - 输入参数 geojson 必须是有效的 JSON 字符串 - 坐标顺序为 [经度, 纬度] (WGS84 坐标系) - 返回所有自相交点的位置坐标 - 依赖于 Turf.js 库和 Node.js 环境

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
geojsonYes

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 the full burden of behavioral disclosure. It effectively describes what the tool does (detects and returns self-intersection points), specifies the coordinate system (WGS84 with longitude first), mentions dependencies (Turf.js and Node.js), and documents error conditions (JavaScript execution failures, timeouts, or invalid input). It also clarifies that it returns ALL self-intersection points, which is useful behavioral 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 clear sections (purpose, Args, Returns, Raises, Example, Notes) and front-loads the core functionality. While somewhat lengthy due to the detailed parameter and example information, every sentence serves a purpose in clarifying the tool's behavior and usage, with minimal redundancy.

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 (geometric analysis with specific dependencies), no annotations, and an output schema (which the description references but doesn't need to fully explain), the description is complete. It covers purpose, parameter details, return format, error conditions, dependencies, and provides an example, leaving no significant gaps for a tool of this nature.

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?

With 0% schema description coverage (the schema only indicates 'geojson' is a required string), the description fully compensates by providing comprehensive parameter semantics. It details the parameter type (JSON string), supported formats (specific GeoJSON types), coordinate system, and includes a concrete example. This adds significant value beyond the minimal schema information.

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 with specific verb ('查找' meaning 'find/detect') and resource ('几何图形中的自相交点' meaning 'self-intersection points in geometric shapes'). It distinguishes from siblings by focusing on kink detection rather than other geometric operations like boolean checks, transformations, or measurements listed among the many 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 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 (to detect self-intersections in line or polygon geometries) and specifies the supported GeoJSON types (LineString, MultiLineString, Polygon, MultiPolygon). However, it doesn't explicitly state when NOT to use it or name specific alternatives among the sibling tools, though the sibling list includes related tools like 'misc_unkink_polygon' that might serve different purposes.

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