Skip to main content
Glama

create_schema

Create schemas with integrated validation for AI agent configurations, covering persona, API, workflow, skill, and MCP tool or resource settings.

Instructions

Create schema with integrated validation

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": {
      "agent_id": "<agent_id>",
      "schema_type": "<schema_type>",
      "schema_data": "<schema_data>"
    },
    "name": "create_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoLegacy field with no effect. The name belongs inside schema_data, such as tool_definition.name or skill.name.
agent_idYesAgent UUID
descriptionNoSchema description
schema_dataYesSchema data. Read zihin://schemas/{schema_type}. persona_config requires editor_schema.persona.role (at least 3 characters) and objective (at least 10). api_config requires tool_definition and editor_schema.api; endpoint.name must equal tool_definition.name. Path parameters use ${name} and must appear in input_schema. Authentication uses prefix and secret_ref, not type; Basic credentials must already be base64 encoded. API timeout_ms is 1000–120000, default 30000. Define nested objects with their own properties. Endpoint transformations: default_body, locked_fields, field_mapping, array_fields, body_format and defaults_from_context. Context defaults are authoritative and override model values when present. workflow_config uses editor_schema.workflow with name, mode (strict|guided|flexible), steps (id, name, description, optional type) and optional transitions. skill_config uses a skill wrapper with name (at least 3 characters), instructions (50–5000 characters) and optional priority (0–1000, higher first). CSPs are separate entities; configure multi-agent limits through a behavior CSP.
schema_typeYesSchema type

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv2.2.4
    • changedInput schema / properties / agent_id / description
      Previous value: -"UUID do agente"New value: +"Agent UUID"
    • changedInput schema / properties / description / description
      Previous value: -"Descrição do schema"New value: +"Schema description"
    • changedInput schema / properties / name / description
      Previous value: -"Sem efeito (legado): schema não tem nome próprio. O nome que vale fica dentro de schema_data (ex.: tool_definition.name, skill.name)."New value: +"Legacy field with no effect. The name belongs inside schema_data, such as tool_definition.name or skill.name."
    • changedInput schema / properties / schema_data / description
      Previous value: -"Dados do schema. Estrutura por tipo:\n\nPERSONA_CONFIG: { editor_schema: { persona: { role: string (obrigatório, minLength 3), objective: string (obrigatório, minLength 10), tone?: string, language?: string, expertise?: string[], constraints?: string[], personality_traits?: string[], custom_guidelines?: object, response_style?: { format?: string, rules?: string[], max_response_length?: number } } } }\n\nAPI_CONFIG: { tool_definition: { name: string (snake_case), description: string (min 20 chars), input_schema: { type: \"object\", required: string[], properties: { campo: { type, description } } } }, editor_schema: { api: { base_url: string (URL), endpoints: [{ name: string (DEVE ser igual a tool_definition.name), method: \"GET\"|\"POST\"|\"PUT\"|\"DELETE\", path: string }], auth?: { prefix: \"Bearer\"|\"Basic\", secret_ref: string } } } }\n\nREGRAS CRÍTICAS para API_CONFIG:\n1. endpoint.name DEVE ser IGUAL a tool_definition.name (senão a tool falha no roteamento interno)\n2. Path parameters usam formato ${variavel} (com cifrão). Ex: /resources/${resource_id}/items\n3. Auth: usar \"prefix\" (não \"type\") no objeto auth. Ex: { \"prefix\": \"Bearer\", \"secret_ref\": \"MY_TOKEN\" }. Para Basic Auth, armazenar o secret já em base64\n4. Para input_schema com objetos aninhados (ex: body complexo com sub-objetos), definir cada campo como type \"object\" com suas próprias properties\n\nCAMPOS DE TRANSFORMAÇÃO (opcionais em cada endpoint):\n- default_body: { \"from\": \"noreply@x.com\" } — valores fixos mergeados no body (LLM pode sobrescrever, exceto locked_fields)\n- locked_fields: [\"from\"] — campos do default_body que o LLM NÃO pode sobrescrever (enforcement server-side)\n- field_mapping: { \"body\": \"html\" } — renomeia campos do body antes de enviar (body vira html)\n- array_fields: [\"to\", \"cc\"] — garante que esses campos sejam sempre arrays\n- body_format: \"array\" — wrappa o body inteiro em array [body] (default: \"object\")\n- defaults_from_context: { \"userId\": \"idUsuario\" } — auto-inject de valores do webhookContext quando LLM não fornece\n\nWORKFLOW_CONFIG: { steps: [{ id, name, action }], transitions: [{ from, to, condition }], conditions?: array }\n\nSKILL_CONFIG: { skill: { name: string (minLength 3), instructions: string (minLength 50, markdown com regras comportamentais), priority?: integer (0-1000, default 0, maior = aparece primeiro no prompt) } }\n\nContrato formal de cada tipo: resource zihin://schemas/{schema_type}. CSPs não são schemas — campos multi-agent (max_agent_depth, allowed_invoke_agents, child_timeout_ms) vivem em create_csp com policy_type=behavior."New value: +"Schema data. Read zihin://schemas/{schema_type}. persona_config requires editor_schema.persona.role (at least 3 characters) and objective (at least 10). api_config requires tool_definition and editor_schema.api; endpoint.name must equal tool_definition.name. Path parameters use ${name} and must appear in input_schema. Authentication uses prefix and secret_ref, not type; Basic credentials must already be base64 encoded. API timeout_ms is 1000–120000, default 30000. Define nested objects with their own properties. Endpoint transformations: default_body, locked_fields, field_mapping, array_fields, body_format and defaults_from_context. Context defaults are authoritative and override model values when present. workflow_config uses editor_schema.workflow with name, mode (strict|guided|flexible), steps (id, name, description, optional type) and optional transitions. skill_config uses a skill wrapper with name (at least 3 characters), instructions (50–5000 characters) and optional priority (0–1000, higher first). CSPs are separate entities; configure multi-agent limits through a behavior CSP."
    • changedInput schema / properties / schema_type / description
      Previous value: -"Tipo do schema"New value: +"Schema type"
  2. Changed4 schema fields changedv2.2.2
    • changedInput schema / properties / name / description
      Previous value: -"Nome do schema"New value: +"Sem efeito (legado): schema não tem nome próprio. O nome que vale fica dentro de schema_data (ex.: tool_definition.name, skill.name)."
    • changedInput schema / properties / schema_data / description
      Previous value: -"Dados do schema. Estrutura por tipo:\n\nPERSONA_CONFIG: { editor_schema: { persona: { role: string (obrigatório, minLength 3), objective: string (obrigatório, minLength 10), tone?: string, language?: string, expertise?: string[], constraints?: string[], personality_traits?: string[], custom_guidelines?: object, response_style?: { format?: string, rules?: string[], max_response_length?: number } } } }\n\nAPI_CONFIG: { tool_definition: { name: string (snake_case), description: string (min 20 chars), input_schema: { type: \"object\", required: string[], properties: { campo: { type, description } } } }, editor_schema: { api: { base_url: string (URL), endpoints: [{ name: string (DEVE ser igual a tool_definition.name), method: \"GET\"|\"POST\"|\"PUT\"|\"DELETE\", path: string }], auth?: { prefix: \"Bearer\"|\"Basic\", secret_ref: string } } } }\n\nREGRAS CRÍTICAS para API_CONFIG:\n1. endpoint.name DEVE ser IGUAL a tool_definition.name (senão a tool falha no roteamento interno)\n2. Path parameters usam formato ${variavel} (com cifrão). Ex: /resources/${resource_id}/items\n3. Auth: usar \"prefix\" (não \"type\") no objeto auth. Ex: { \"prefix\": \"Bearer\", \"secret_ref\": \"MY_TOKEN\" }. Para Basic Auth, armazenar o secret já em base64\n4. Para input_schema com objetos aninhados (ex: body complexo com sub-objetos), definir cada campo como type \"object\" com suas próprias properties\n\nCAMPOS DE TRANSFORMAÇÃO (opcionais em cada endpoint):\n- default_body: { \"from\": \"noreply@x.com\" } — valores fixos mergeados no body (LLM pode sobrescrever, exceto locked_fields)\n- locked_fields: [\"from\"] — campos do default_body que o LLM NÃO pode sobrescrever (enforcement server-side)\n- field_mapping: { \"body\": \"html\" } — renomeia campos do body antes de enviar (body vira html)\n- array_fields: [\"to\", \"cc\"] — garante que esses campos sejam sempre arrays\n- body_format: \"array\" — wrappa o body inteiro em array [body] (default: \"object\")\n- defaults_from_context: { \"userId\": \"idUsuario\" } — auto-inject de valores do webhookContext quando LLM não fornece\n\nDB_CONFIG: { connection_id: uuid (de private_context_connections), tool_definition: { name, description, input_schema }, query_template: string (SQL com $1, $2...), parameter_mapping: string[] (campos do input na ordem dos $N), result_mapping?: { format: \"raw\"|\"table\"|\"summary\", max_rows?: number } }\n\nWORKFLOW_CONFIG: { steps: [{ id, name, action }], transitions: [{ from, to, condition }], conditions?: array }\n\nSKILL_CONFIG: { skill: { name: string (minLength 3), instructions: string (minLength 50, markdown com regras comportamentais), priority?: integer (0-1000, default 0, maior = aparece primeiro no prompt) } }\n\nContrato formal de cada tipo: resource zihin://schemas/{schema_type}. CSPs não são schemas — campos multi-agent (max_agent_depth, allowed_invoke_agents, child_timeout_ms) vivem em create_csp com policy_type=behavior."New value: +"Dados do schema. Estrutura por tipo:\n\nPERSONA_CONFIG: { editor_schema: { persona: { role: string (obrigatório, minLength 3), objective: string (obrigatório, minLength 10), tone?: string, language?: string, expertise?: string[], constraints?: string[], personality_traits?: string[], custom_guidelines?: object, response_style?: { format?: string, rules?: string[], max_response_length?: number } } } }\n\nAPI_CONFIG: { tool_definition: { name: string (snake_case), description: string (min 20 chars), input_schema: { type: \"object\", required: string[], properties: { campo: { type, description } } } }, editor_schema: { api: { base_url: string (URL), endpoints: [{ name: string (DEVE ser igual a tool_definition.name), method: \"GET\"|\"POST\"|\"PUT\"|\"DELETE\", path: string }], auth?: { prefix: \"Bearer\"|\"Basic\", secret_ref: string } } } }\n\nREGRAS CRÍTICAS para API_CONFIG:\n1. endpoint.name DEVE ser IGUAL a tool_definition.name (senão a tool falha no roteamento interno)\n2. Path parameters usam formato ${variavel} (com cifrão). Ex: /resources/${resource_id}/items\n3. Auth: usar \"prefix\" (não \"type\") no objeto auth. Ex: { \"prefix\": \"Bearer\", \"secret_ref\": \"MY_TOKEN\" }. Para Basic Auth, armazenar o secret já em base64\n4. Para input_schema com objetos aninhados (ex: body complexo com sub-objetos), definir cada campo como type \"object\" com suas próprias properties\n\nCAMPOS DE TRANSFORMAÇÃO (opcionais em cada endpoint):\n- default_body: { \"from\": \"noreply@x.com\" } — valores fixos mergeados no body (LLM pode sobrescrever, exceto locked_fields)\n- locked_fields: [\"from\"] — campos do default_body que o LLM NÃO pode sobrescrever (enforcement server-side)\n- field_mapping: { \"body\": \"html\" } — renomeia campos do body antes de enviar (body vira html)\n- array_fields: [\"to\", \"cc\"] — garante que esses campos sejam sempre arrays\n- body_format: \"array\" — wrappa o body inteiro em array [body] (default: \"object\")\n- defaults_from_context: { \"userId\": \"idUsuario\" } — auto-inject de valores do webhookContext quando LLM não fornece\n\nWORKFLOW_CONFIG: { steps: [{ id, name, action }], transitions: [{ from, to, condition }], conditions?: array }\n\nSKILL_CONFIG: { skill: { name: string (minLength 3), instructions: string (minLength 50, markdown com regras comportamentais), priority?: integer (0-1000, default 0, maior = aparece primeiro no prompt) } }\n\nContrato formal de cada tipo: resource zihin://schemas/{schema_type}. CSPs não são schemas — campos multi-agent (max_agent_depth, allowed_invoke_agents, child_timeout_ms) vivem em create_csp com policy_type=behavior."
    • changedInput schema / properties / schema_type / enum
      Previous value: -[
      -  "persona_config",
      -  "api_config",
      -  "db_config",
      -  "workflow_config",
      -  "skill_config",
      -  "mcp_tool_config",
      -  "mcp_resource_config"
      -]New value: +[
      +  "persona_config",
      +  "api_config",
      +  "workflow_config",
      +  "skill_config",
      +  "mcp_tool_config",
      +  "mcp_resource_config"
      +]
    • changedInput schema / required
      Previous value: -[
      -  "agent_id",
      -  "name",
      -  "schema_type",
      -  "schema_data"
      -]New value: +[
      +  "agent_id",
      +  "schema_type",
      +  "schema_data"
      +]
  3. First observedv0.1.0

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare this is a non-read-only, non-destructive, non-idempotent creation call, so the safety profile is covered. The description adds one genuinely new behavioral fact — that validation is integrated, implying invalid data is rejected rather than partially persisted — but says nothing about failure modes, permissions, or whether re-creating the same name duplicates the entity (consistent with idempotentHint=false, though unexplained).

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?

A single short phrase, front-loaded with the verb and free of padding or redundant restatement of the schema. It is efficient, though its brevity borders on under-specification rather than tidy conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a create operation over a polymorphic six-type schema_config payload with nested objects, and it has no output schema, yet the description never says what is returned (e.g., the created schema id) or how schema_type drives validation. The very rich input schema compensates heavily for payload construction, keeping this at a minimum-viable 3 rather than lower.

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 description coverage is 100%, and the schema_data field documentation is exceptionally detailed (per-type requirements, ranges, transformation semantics), so the schema already carries parameter meaning fully. The description contributes nothing about parameters beyond the word "validation"; baseline 3 applies when the schema does all the work.

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

Purpose3/5

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

"Create schema with integrated validation" names the verb and resource, but the resource half is a near-restatement of the tool name and the phrase "integrated validation" is the only distinguishing detail. It does not differentiate from siblings like update_schema, get_schema, or validate_schema_data, so an agent gets only a vague sense of what makes this the right create variant.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance at all: no mention of prerequisites (e.g., an existing agent_id), no contrast with update_schema for modifying an existing schema, and no statement about when validation would reject input. The agent must infer usage entirely from the name.

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

Deploy Server

Other Tools