Skip to main content
Glama

generate_jsonld

Converts schema.org objects into JSON-LD script tags with escaped closing tags. Accepts a single object or an array for structured data generation.

Instructions

Serialize one or several schema.org objects into a JSON-LD script tag, with the sequence escaped. Pass a schema object or an array of them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaYes
Behavior3/5

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

With no annotations, the description must disclose all behavioral traits. It mentions the escaping of </script>, which is a valuable detail, but it does not specify the return format (e.g., string vs. DOM node), error handling, or side effects. The tool appears safe, but the description lacks comprehensive behavioral disclosure.

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 a single, well-structured sentence that conveys the action, input, output, and an important safety detail (escaping). It is concise, front-loaded, and contains no unnecessary words, making it highly scannable for an agent.

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?

The description covers the core functionality but leaves gaps. There is no output schema, so the description should specify what is returned (e.g., a string containing the script tag). It also does not address error conditions or usage prerequisites. For a simple one-parameter tool, this is adequate but not fully complete.

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?

The input schema has no description on the schema property, so the description compensates by explaining that it accepts a schema object or an array of them. This adds semantic meaning beyond the schema's type declaration, clarifying what kind of objects are expected. It covers the single parameter adequately, though it could elaborate on the structure of the schema.org objects.

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 tool's function: it serializes schema.org objects into a JSON-LD script tag. It specifies the input format (single object or array) and a key output detail (escaping </script>). This distinguishes it from siblings like generate_head or generate_sitemap, which serve different purposes.

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 description implies usage when JSON-LD output is needed but does not explicitly state when to use this tool versus alternatives. Since the tool name and purpose are self-evident, the usage context is clear, but there is no explicit guidance on when to prefer it or when not to.

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/Polymathie-Studio/ds4ai-mcp'

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