Skip to main content
Glama

validate_type

Validate a proposed user-defined ontology type before saving it by checking name conflicts, inheritance, and field definitions.

Instructions

Validate a proposed user-defined type before writing it to ontology-user.yaml. Returns {"valid": bool, "errors": [...], "resolved_fields": {...}}.

Args: name: Proposed type name — must not collide with any canonical type. extends: A canonical type to inherit from (e.g. "procedure", "task"). fields: Optional list of additional fields: [{name, type, values?}]. 'type' is one of: string | array | datetime | enum | boolean. For enum fields, include 'values': [...].

Input Schema

NameRequiredDescriptionDefault
nameYes
fieldsNo
extendsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A4.3/5.0
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, and it does disclose that this is a non-mutating pre-check and reports the exact return shape (valid/errors/resolved_fields). It also surfaces a real constraint — the name must not collide with any canonical type — but says nothing about permissions, whether resolved_fields reflects inheritance expansion, or error ordering.

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

Conciseness5/5

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

One front-loaded purpose sentence, then the return contract, then a compact Args block — no filler. The Args indentation is docstring-style rather than prose, but every line supplies information absent from the schema.

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?

For a 3-parameter tool with zero schema coverage and no output schema, the definition is nearly self-sufficient: all three parameters are explained and the return shape is inlined. What's missing is only edge behavior — e.g. whether validation is purely syntactic or resolves against the existing ontology graph.

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?

Schema description coverage is 0%, so the description must do all the work, and it does: name is documented with its collision constraint, extends with concrete canonical examples ("procedure", "task"), and fields with its item shape, the allowed type values, and the enum-specific 'values' requirement. This is meaningfully more than the bare schema conveys.

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 description opens with a specific verb and resource: validate a proposed user-defined type, scoped to the target artifact ontology-user.yaml, and frames it as a pre-write check. That distinguishes it reasonably well from the sibling define_type (which presumably performs the write), though it never names define_type explicitly.

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 states a clear usage context — call this before writing the type to ontology-user.yaml — which tells an agent where this fits in the workflow. It stops short of explicit exclusions or naming the write-path sibling as the alternative, so it lands just under a full 5.

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