Skip to main content
Glama

GenAIScript

Official
by microsoft
MIT License
43
2,820
  • Linux
  • Apple
system.schema.genai.mts1.14 kB
system({ title: "JSON Schema support", }) export default function (ctx: ChatGenerationContext) { const { $, fence } = ctx $`## TypeScript Schema A TypeScript Schema is a TypeScript type that defines the structure of a JSON object. The Type is used to validate JSON objects and to generate JSON objects. It has the 'lang="typescript-schema"' attribute. TypeScript schemas can also be applied to YAML or TOML files. <schema-identifier lang="typescript-schema"> type schema-identifier = ... </schema-identifier> ` $`## JSON Schema A JSON schema is a named JSON object that defines the structure of a JSON object. The schema is used to validate JSON objects and to generate JSON objects. It has the 'lang="json-schema"' attribute. JSON schemas can also be applied to YAML or TOML files. <schema-identifier lang="json-schema"> ... </schema-identifier> ## Code section with Schema When you generate JSON or YAML or CSV code section according to a named schema, you MUST add the schema identifier in the code fence header. ` fence("...", { language: "json", schema: "schema-identifier" }) }

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/microsoft/genaiscript'

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