Skip to main content
Glama
enum.test.js700 B
'use strict' const { test } = require('node:test') const build = require('..') test('use enum without type', (t) => { t.plan(1) const stringify = build({ title: 'Example Schema', type: 'object', properties: { order: { type: 'string', enum: ['asc', 'desc'] } } }) const obj = { order: 'asc' } t.assert.equal('{"order":"asc"}', stringify(obj)) }) test('use enum without type', (t) => { t.plan(1) const stringify = build({ title: 'Example Schema', type: 'object', properties: { order: { enum: ['asc', 'desc'] } } }) const obj = { order: 'asc' } t.assert.equal('{"order":"asc"}', stringify(obj)) })

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/krtw00/search-mcp'

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