Skip to main content
Glama

create_spec

Create or overwrite a design spec (component, page, or dataviz) in the registry with Zod validation. Returns confirmation or error details.

Instructions

Create or overwrite a spec in the registry (Zod-validated). Same-name specs are silently overwritten — check get_specs first.

Returns: Spec "<name>" saved (<type>). Errors: isError with Zod details on schema/JSON/type failures. Schemas — component: name, type, atomicLevel ("atom"|"molecule"|"organism"|"template"), purpose, props[], variants[], composesSpecs[] (atoms must be []), codeConnect{}; page: name, type, purpose, sections[]; dataviz: name, type, chartType, dataShape.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specYesJSON string of the full spec object. Must include a 'type' field ('component', 'page', or 'dataviz') and all required fields for that spec type. Zod validation errors are returned as structured error messages if the shape is invalid.
Behavior5/5

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

No annotations exist, so description fully covers behavior: returns success message, errors with Zod details, and lists schemas for different spec types, ensuring the agent understands outcomes and pitfalls.

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?

Well-structured with a concise action line, then return/error info, then schema details. Slightly lengthy due to schema enumeration, but the detail is valuable and organized.

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?

Given one parameter and no output schema, the description covers input, output, errors, overwrite behavior, and type-specific requirements, making it fully self-contained for an agent.

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?

Parameter 'spec' is a JSON string; description explains required fields (like 'type') and validates via Zod. It also details the schema structure for each spec type, adding substantial context beyond the schema.

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?

Clearly states the verb 'create or overwrite' and the resource 'spec in the registry', with Zod validation. It distinguishes from sibling tools like get_specs and update_token.

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

Usage Guidelines5/5

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

Explicitly warns about silent overwriting and advises to check get_specs first, providing clear when-to-use and when-to-avoid guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sarveshsea/memi'

If you have feedback or need assistance with the MCP directory API, please join our Discord server