Skip to main content
Glama

infer_multi_target_schema

Read-onlyIdempotent

Infer unified schemas from JSON or JSONL samples and generate TypeScript, Zod, Go, PostgreSQL DDL, and JSON Schema outputs for consistent data modeling.

Instructions

Infers unified schemas across single JSON payloads or 1,000+ .jsonl rows (optional ?, | null, UUID, ISO timestamps, and string | bigint hazards) into TypeScript, Zod v3, Go struct, PostgreSQL DDL, and JSON Schema Draft 2020-12.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "infer_multi_target_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetsNoOptional subset of codegen targets to return; when omitted, all five targets (TypeScript, Zod, Go, PostgreSQL, JSON Schema) are returned.
filePathNoOptional local file path to a .json or .jsonl sample file on disk when payloadContent is omitted.
rootNameNoRoot PascalCase type or struct identifier emitted in TypeScript, Zod v3, Go, and JSON Schema (defaults to "RootRecord").
tableNameNoTarget snake_case SQL table identifier emitted in PostgreSQL CREATE TABLE DDL (defaults to "json_records").
payloadContentNoRaw JSON object, JSON array, or multi-line .jsonl sample stream used for union schema and type inference.
expandUnescapedNoWhen true (default), promotes nested stringified JSON log strings into structured object types instead of opaque strings.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, yet the description adds real context: it discloses the inference hazards handled (optional `?`, `| null`, UUID, ISO timestamps, string|bigint) and the default nested-JSON promotion. It does not describe pagination/result shape or error behavior for invalid input.

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 dense sentence that front-loads the core purpose and enumerates outputs; every clause carries information. It is packed with parenthetical detail but not padded or redundant.

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 read-only codegen tool with all six parameters fully documented and no output schema, the description covers inputs, emitted targets, and inference edge cases. Only the shape of the returned per-target output is left unstated.

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%, so the baseline is 3. The description reinforces the `targets` set by naming the five outputs and echoes the stringified-JSON promotion tied to a parameter, but adds no new per-parameter semantics beyond what the schema already documents.

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?

Specific verb+resource: "Infers unified schemas across single JSON payloads or 1,000+ .jsonl rows" and names all five emitted artifacts. It clearly distinguishes itself from siblings by function, but never explicitly names or contrasts against them, so it stops short of a 5.

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?

The input shapes (single JSON payload vs. 1,000+ .jsonl rows) imply when the tool applies, but there are no explicit when-to-use/when-not statements or references to the sibling tools as alternatives. Usage must be inferred.

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