Skip to main content
Glama

export_ttl

Export a run's ontology, data, and accepted SHACL rules as W3C Turtle files to a local folder, skipping incorrect objects and relations. Returns paths and byte sizes, not contents.

Instructions

按 W3C 标准导出 Turtle:ontology.ttl(OWL 类、字段、关系、识别键)、data.ttl(每个对象按识别值命名,同一对象跨表跨版本同名)、shapes.ttl(采纳的规则写成 SHACL,有规则时才有)。判错的对象和关系不导出。文件写到本机的一个文件夹(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_ttl"
  }
}

Input Schema

NameRequiredDescriptionDefault
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.2/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so: it discloses that files are written to a local folder, that same-named files are overwritten, that a manifest .ontopoc-export.json is left behind, that files listed in the prior manifest but absent this run are deleted (returned in `removed`) while files outside the manifest are untouched, and that a non-bare filename aborts the entire export with zero files written. It also describes the return payload shape and explicitly notes 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?

Front-loaded with what gets exported, then the naming/manifest semantics, then the error condition — a logical order with no filler. It is dense (a long single block rather than separated points), which slightly hurts scanability, but every sentence supplies non-redundant information.

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?

Despite having no output schema and no annotations, the description defines the return structure ({dir, files:[{name, path, bytes}], total_bytes, removed}), side effects (manifest file, overwrite, deletion of stale files), and failure behavior. For a write-side-effect export tool with two parameters, that is complete enough to invoke correctly.

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 coverage is 100% and both parameters (out_dir, saved_as) are already documented in the schema, so the baseline is 3. The description adds the default out_dir path pattern and confirms saved_as comes from list_runs/build_ontology, plus the failure mode for invalid filenames — useful but marginal beyond the 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 names the operation (export Turtle per W3C standard) and enumerates the exact artifacts produced: ontology.ttl (OWL classes, fields, relations, identification keys), data.ttl (objects named by identification value), and shapes.ttl (adopted rules as SHACL). It also states a scope boundary — objects and relations judged invalid are excluded — and the sibling names export_forms/export_mermaid/export_pipeline_spec make the format-specific distinction clear.

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 artifact list: an agent can infer this is the tool for Turtle/RDF output rather than forms or mermaid. However, the description never explicitly states when to choose this over the sibling exporters, nor does it state prerequisites (e.g., that an ontology must already be built/confirmed before export). It documents re-export behavior but not selection guidance.

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