Skip to main content
Glama

Build the ontology from any file

ontology_discover
Idempotent

Auto ontology (ADR 0033): read what another tool exported, with no mapping by hand. ReqIF (one record type per spec object type, relations as links), XMI from Cameo, astah or OMG (one per stereotype or UML type), STEP Part 21 (products, assemblies, PMI), FMU (variables by causality, units), Excel (every sheet), CSV, TSV, JSON (every array of objects at any depth), MATLAB scripts (struct arrays) and KiCad netlists. A column whose values are another record type's keys is found as a foreign key. Without text: { sources } lists each record type with its columns, key, title, sample rows and the SysML object type it would become. With text: each record type becomes an @ObjectType definition (attributes typed, units read from column names), each foreign key a @LinkType connection def, and the records become objects and connections, applied as compiler checked edits; text is the new model. Send a newer export of the same file again to update: record types the model already binds are only synced. Nothing is saved: show the user what was created, then use the returned text. Later syncs of a single table can also use ontology_sync.

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": {
      "files": "<files>"
    },
    "name": "ontology_discover"
  }
}

Input Schema

NameRequiredDescriptionDefault
syncNoBring the records in as objects (default true); false adds only the definitions.
textNoThe model to add the object types to. Leave it out to only read the files.
filesYes
linksNoCreate link types for the links the files state (ReqIF relations, XMI ownership, nested JSON) and the foreign keys found (default true).
record_typesNoRecord types to add, as "<file>#<type>" or "<type>" (default all).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare a non-read-only, idempotent, non-destructive, closed-world operation, and the description adds meaningful behavior beyond them: results are not persisted, edits are compiler-checked, already-bound record types are only synced on re-export, and foreign keys are inferred from key-valued columns. It stops short of describing return shape details or limits on large files beyond the schema's max sizes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded, but the body is a dense run-on that packs ten file formats, their parsing semantics, two operating modes, and update behavior into a few semicolon-chained clauses. The format catalog earns some of its space but would read far better as a list; several parentheticals could be trimmed without losing selection value.

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?

With no output schema, the description carries the return-value burden and mostly does: it specifies what the no-text result contains per record type (columns, key, title, sample rows, SysML type) and what the text mode produces (@ObjectType and @LinkType definitions, objects, connections) as returned text. Only the precise shape of the returned text and error behavior remain unspecified, which is reasonable for this complexity.

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 80% and the schema already explains files, encoding, text, sync, links, and record_types. The description adds only modest meaning beyond that — 'text is the new model', units read from column names, and that the file extension selects the reader — so the baseline 3 for a well-documented schema applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence states a specific action and artifact: build an auto ontology from what another tool exported, with no hand mapping (ADR 0033). It implicitly separates itself from a manual import/mapping path and later names ontology_sync, but the long parenthetical format catalog dilutes the core statement rather than sharpening it.

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?

It gives explicit branches: no text means a read-only listing of record types; with text means definitions and objects are generated as compiler-checked edits. It also routes a specific case ('Later syncs of a single table') to ontology_sync and warns that nothing is saved so the returned text must be used — strong guidance, though there is no explicit when-not-to-use statement.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources