Skip to main content
Glama

crafty_get_schema

Retrieve specific JSON schemas by name from Crafty Controller to define data structures and validate configurations.

Instructions

Get a specific JSON schema by name from Crafty Controller. Use crafty_list_schemas to discover available schema names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schema_nameYesSchema name (use crafty_list_schemas to see available names)

Implementation Reference

  • Registration and handler implementation for the 'crafty_get_schema' tool.
    server.tool(
      "crafty_get_schema",
      "Get a specific JSON schema by name from Crafty Controller. Use crafty_list_schemas to discover available schema names.",
      {
        schema_name: z
          .string()
          .describe("Schema name (use crafty_list_schemas to see available names)"),
      },
      async ({ schema_name }) => {
        try {
          const data = await client.get(`/jsonschema/${schema_name}`);
          return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return { content: [{ type: "text", text: `Error: ${msg}` }], isError: true };
        }
      }
    );
Behavior3/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It indicates this is a read operation ('Get'), implying it's likely non-destructive and safe, but doesn't specify authentication requirements, rate limits, error handling, or response format. The description adds basic context but lacks detailed behavioral traits.

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?

The description is two sentences with zero waste: the first states the purpose, and the second provides essential usage guidance. It's front-loaded with the core function and efficiently structured, making every sentence earn its place.

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?

Given the tool's low complexity (1 parameter, no output schema, no annotations), the description is reasonably complete. It covers purpose and usage, but lacks details on authentication, error cases, or return values, which could be helpful since no annotations or output schema exist. It's adequate but has minor gaps.

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?

The input schema has 100% description coverage, with the parameter 'schema_name' fully documented in the schema. The description adds minimal value beyond the schema by repeating the reference to crafty_list_schemas, but doesn't provide additional semantic context like format examples or constraints. This meets the baseline for high schema coverage.

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?

The description clearly states the specific action ('Get a specific JSON schema by name') and resource ('from Crafty Controller'), distinguishing it from sibling tools like crafty_list_schemas (which lists schemas) and other server/user/role tools. It precisely communicates the tool's function without redundancy.

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?

The description explicitly provides usage guidance by stating 'Use crafty_list_schemas to discover available schema names,' which tells the agent when to use this tool (after identifying schema names) and references an alternative tool for discovery. This directly addresses when and how to use it in context.

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/HadiCherkaoui/crafty-mcp'

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