Skip to main content
Glama

export_mermaid

Generates Mermaid organization charts from an ontology run, including reporting and collaboration handoff relationships, with optional year filtering, and returns written file paths and byte counts.

Instructions

组织架构模式的运行导出组织图(Mermaid):组织隶属.mmd(隶属、汇报、担任)和协作交接.mmd(协作、交接及交接内容)。years 写 2016-2022 只画这段时间的关系,没写时间的关系每段都画;判错的不画。文件写到本机的一个文件夹(out_dir,默认在下载文件夹里),同名覆盖,只返回文件的路径和字节数 {dir, files: [{name, path, bytes}], total_bytes, removed},不返回文件内容。文件夹里会留一份清单 .ontopoc-export.json,记着这一类导出这次写了哪些文件;再导出到同一个文件夹时,上次清单里有、这次没有的文件会被删掉(removed 是删掉的文件名),清单以外的文件不碰。文件名必须是单纯的文件名,否则整次导出报错、一个文件也不写。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "saved_as": "<saved_as>"
    },
    "name": "export_mermaid"
  }
}

Input Schema

NameRequiredDescriptionDefault
yearsNo只画这段年份的关系,如 2016-2022;不写就每段都画
out_dirNo导出文件写到哪个文件夹,必须是绝对路径;不写就是 ~/Downloads/OntoPoc/<运行保存名去掉 .json>/<forms|ttl|mermaid|pipeline>/
saved_asYes运行的保存名,来自 list_runs 或 build_ontology

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses overwrite-on-same-name behavior, the .ontopoc-export.json manifest, the destructive pruning of previously-exported-but-missing files, the guarantee that files outside the manifest are untouched, and the all-or-nothing failure on invalid filenames. It also states the return shape and explicitly says file contents are not returned.

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 dense but front-loads the purpose and artifact names before moving to semantics and side effects. Every sentence carries operational information, though the manifest/pruning explanation is somewhat long and could be tightened without losing meaning.

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?

There is no output schema, but the description fully specifies the return object ({dir, files, total_bytes, removed}) and explicitly notes contents are omitted. For a file-writing tool with destructive side effects, the combination of default path, overwrite rule, pruning rule, and error behavior leaves nothing material for the agent to guess.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema: it explains that untimed relations appear in every segment and that misjudged relations are skipped for years, plus the default out_dir convention. The saved_as parameter is left entirely to the schema, which is the only gap.

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 states a specific verb and resource (导出组织图 Mermaid,组织隶属.mmd 与 协作交接.mmd) and scopes it to organizational-structure-mode runs. An agent can immediately distinguish this from export_ttl, export_forms, and export_pipeline_spec by the artifact type produced.

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?

Usage is implied by the phrase 组织架构模式的运行, which tells the agent this applies to org-structure runs and not other export categories. However, it never explicitly names a sibling alternative (e.g. export_ttl or export_forms) or states when NOT to use this tool, leaving the agent to infer the routing decision.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.