Skip to main content
Glama

cad_json

Read-onlyIdempotent

Read, parse, validate, import, and export JSON for CAD scenes and geometry. Load files, validate against scene/geometry schemas, and exchange object or scene data.

Instructions

Read / parse / validate / import / export JSON.

按 ``action`` 执行 JSON 读写、解析、校验、导入与导出:
- load:读取文件原文
- parse:解析并报告结构
- validate:按 scene/geometry 模式校验
- import_geometry:将 JSON 几何导入当前文档
- export_geometry:将对象导出为 JSON
- import_scene:以 JSON 场景创建新文档
- export_scene:导出当前文档为 JSON 场景
- save:将 JSON 字符串写入文件

When not to use: ``cad_json`` operates on JSON text and scene data in
memory. To read/write the JSON scene as a whole file use ``cad_file``
(open/save); for interop formats (STEP/DXF/STL/DWG) use ``cad_file``
(import/export); for creating/editing individual geometry objects use
``cad_object``.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYesJSON action, discriminated by `action`: load, parse, validate, import_geometry, export_geometry, import_scene, export_scene or save.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction executed
errorsNoValidation errors
statusYesOperation status
contentNoRaw / serialized JSON content
messageNoStatus description
is_validNoValidity (parse/validate actions)
object_countNoNumber of objects handled
imported_objectsNoImported object summaries
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description contradicts the annotations: readOnlyHint=true conflicts with actions such as save (writes to file) and import_geometry/import_scene (modify or create documents). The description itself reveals these mutating behaviors, yet the annotations claim read-only. This is a severe inconsistency.

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 structured with a clear summary, a bulleted action list, and an exclusion paragraph. It is somewhat lengthy due to bilingual duplication, but every section earns its place and important information is front-loaded.

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?

The description covers all 8 actions, explains the in-memory scope, and provides usage exclusions, which is strong for a multi-action tool. The presence of an output schema reduces the need to explain return values. One point is lost due to the annotation contradiction that undermines overall clarity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents every parameter. The description adds a high-level list of actions and bilingual explanations, but does not go beyond the schema to clarify parameter syntax or edge cases. Baseline 3 is appropriate.

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 specific verbs and resources: 'Read / parse / validate / import / export JSON' and enumerates 8 distinct actions. It distinguishes from siblings by explicitly framing cad_json as operating on JSON text and in-memory scene data, unlike cad_file or cad_object.

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

Usage Guidelines5/5

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

The description includes an explicit 'When not to use' section that names cad_file for file-level open/save and import/export, and cad_object for geometry editing. This gives clear guidance on when to choose this tool vs 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/Tianshang301/TianshangCAD'

If you have feedback or need assistance with the MCP directory API, please join our Discord server