Skip to main content
Glama

Create schema from sample

create_schema_from_sample

Generate and auto-save a schema from reviewed samples, returning schema_id, schema content and record links. Supply entity_samples (or samples_csv), sample_record_id, or both; explicit samples override stored JSON while attachment inheritance is preserved. Samples must describe one entity type in one language. Generation combines their fields and annotates relationships; it does not redesign the approved structure. Resolve consequential modeling choices and whether to generate semantic IDs before calling; semantic IDs need an organization embedding model and add cost. Requires editor; synchronous and billed. Review returned suggestions before applying edits with property tools. Sample review and canonicalizations: enricher://docs/schema-from-sample; schema format: enricher://docs/schema-reference.

Input Schema

NameRequiredDescriptionDefault
modelNoModel composite key; leave it on auto (the default). auto is YOUR model, or with use_platform_models=true the organization's best model for this task from its benchmark scores (quality/speed/cost weights), within the run's constraints (attachments, web search, thinking) — the result reports the pick as model_selection. Name a provider::model only when the user named one; that runs the job on the platform (billed). Keys: list_models.auto
languageNoLanguage of schema type names/descriptions and annotations; defaults to the sample-key language. Sample property names are not translated. Separate from enrichment output languages.
samples_csvNoSamples as CSV text instead of entity_samples (never both): the first row is ALWAYS the header, each data row one sample. Delimiter ',', ';' or tab; headers become identifier keys ('Author Name' -> author_name); each column gets one type (integer, number, boolean or text; empty cell = null; decimal commas read in ';'/tab text). Over 20 rows, 20 are kept, covering every column. Read the result's csv_import and relay the kept rows and renamed headers.
attachment_idsNoUUIDs used as source context and persisted for regeneration. With sample_record_id, omit to inherit its linked attachments; pass [] to deliberately use none, or a non-empty list to override.
entity_samplesNo1..20 reviewed instances of one entity type. Required without sample_record_id. Explicit samples override stored JSON while keeping attachment inheritance. Fields are unioned; missing/null observations become nullable. Use consistent names across samples and array items. Single-language data only; set multilingual flags after generation with update_schema_property.
timeout_secondsNoWall-clock cap; returns a timeout error past this.
reasoning_effortNoThinking (reasoning) opt-in: low, medium or high; omitted = off. On the platform, auto then picks only a model whose reasoning the platform can pilot, and the effort is translated per provider. On YOUR model, apply the effort yourself when you run the requests.
sample_record_idNoUUID of a successful sample_generation record. Its stored sample(s) are used when entity_samples is omitted, and its linked attachments are inherited when attachment_ids is omitted.
use_platform_modelsNofalse (default): every LLM call of this job runs on YOUR model — the job parks each call as a pending request you answer with answer_llm_request; no credits are consumed. true: the job runs on the platform (billed) and, with the model left on auto, on the organization's best model for the task — its highest blended benchmark score under the organization's quality/speed/cost weights, among the models that satisfy the run (attachments, web search, thinking). Naming a platform model also runs the job there, bypassing that pick: do it only when the user named one. Protocol: enricher://docs/llm-delegation.
generate_semantic_idsNoAdd semantic IDs to eligible keyed objects. Requires an organization embedding model and adds resolution cost. Recommend for reusable identities without stable machine keys; obtain agreement before enabling unless already authorized. Defaults false. Modeling guidance: enricher://docs/schema-from-sample.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedInput schema / properties / delegate_llm_calls
      Removed value: -{
      -  "default": false,
      -  "description": "Run every LLM call of this job on YOUR model instead of a platform model: the job parks each call as a pending request you answer with answer_llm_request; no credits are consumed. Model parameters must then be omitted or 'auto'. Plan feature. Protocol: enricher://docs/llm-delegation.",
      -  "title": "Delegate Llm Calls",
      -  "type": "boolean"
      -}
    • changedInput schema / properties / model / description
      Previous value: -"Model composite key, or auto (default) for the organization task selection. Explicit keys are discovered through list_models."New value: +"Model composite key; leave it on auto (the default). auto is YOUR model, or with use_platform_models=true the organization's best model for this task from its benchmark scores (quality/speed/cost weights), within the run's constraints (attachments, web search, thinking) — the result reports the pick as model_selection. Name a provider::model only when the user named one; that runs the job on the platform (billed). Keys: list_models."
    • addedInput schema / properties / reasoning_effort
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "low",
      +        "medium",
      +        "high"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Thinking (reasoning) opt-in: low, medium or high; omitted = off. On the platform, auto then picks only a model whose reasoning the platform can pilot, and the effort is translated per provider. On YOUR model, apply the effort yourself when you run the requests.",
      +  "title": "Reasoning Effort"
      +}
    • addedInput schema / properties / use_platform_models
      Added value: +{
      +  "default": false,
      +  "description": "false (default): every LLM call of this job runs on YOUR model — the job parks each call as a pending request you answer with answer_llm_request; no credits are consumed. true: the job runs on the platform (billed) and, with the model left on auto, on the organization's best model for the task — its highest blended benchmark score under the organization's quality/speed/cost weights, among the models that satisfy the run (attachments, web search, thinking). Naming a platform model also runs the job there, bypassing that pick: do it only when the user named one. Protocol: enricher://docs/llm-delegation.",
      +  "title": "Use Platform Models",
      +  "type": "boolean"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / delegate_llm_calls
      Added value: +{
      +  "default": false,
      +  "description": "Run every LLM call of this job on YOUR model instead of a platform model: the job parks each call as a pending request you answer with answer_llm_request; no credits are consumed. Model parameters must then be omitted or 'auto'. Plan feature. Protocol: enricher://docs/llm-delegation.",
      +  "title": "Delegate Llm Calls",
      +  "type": "boolean"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / samples_csv
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Samples as CSV text instead of entity_samples (never both): the first row is ALWAYS the header, each data row one sample. Delimiter ',', ';' or tab; headers become identifier keys ('Author Name' -> author_name); each column gets one type (integer, number, boolean or text; empty cell = null; decimal commas read in ';'/tab text). Over 20 rows, 20 are kept, covering every column. Read the result's csv_import and relay the kept rows and renamed headers.",
      +  "title": "Samples Csv"
      +}
  4. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnly=false, destructive=false, openWorld=true): discloses that it auto-saves, requires editor role, is synchronous and billed, will not redesign an approved structure, and that semantic IDs need an organization embedding model and add cost. That is exactly the behavioral context an agent needs before committing to a paid synchronous mutation.

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?

Dense and front-loaded — the core action and its returned identifiers come first, followed by input rules, then pre/post-call obligations and doc links. It is long for a single paragraph with heavy semicolon chaining, but nearly every clause carries an instruction the agent would otherwise miss.

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?

Complete for a 10-parameter, high-complexity generation tool: an output schema exists and the description still names what comes back, permission and billing models are stated, the semantic-ID decision is flagged as needing user agreement, and two enricher:// doc links cover sample review and schema format.

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. The description explains the entity_samples/samples_csv exclusivity and the sample_record_id fallback ('its stored samples are used when entity_samples is omitted'), but the override-precedence and semantic-ID cost statements largely restate what the per-parameter descriptions already say, so it adds some, not much, net meaning.

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?

States a specific verb and resource ('Generate and auto-save a schema from reviewed samples') plus the return payload (schema_id, schema content, record links), which lets an agent separate it from update_schema/save_schema/publish_schema siblings without opening a schema.

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?

Explicit about acceptable input combinations ('entity_samples (or samples_csv), sample_record_id, or both'), override precedence, and when to settle modeling decisions before calling. It also routes the agent onward ('review returned suggestions before applying edits with property tools') but never names a sibling it should be used instead of, so the exclusions are implied rather than stated.

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.