Skip to main content
Glama

Query Bundled OpenAPI Specs

query

Search Cumulocity OpenAPI specs by running custom JavaScript functions. Filter paths, methods, and tags to find specific API operations across core and DTM specifications.

Instructions

Search the bundled OpenAPI specs by evaluating a JavaScript function.

This MCP currently exposes the release (latest) bundled core OpenAPI snapshot together with the other bundled product specs for the query tool. Bundled specs on this connection: core (release), dtm (release). Enabled bundled OpenAPI parts for execute policy: core, dtm.

Use coreSpec for the main Cumulocity REST surface such as inventory, alarms, events, measurements, identity, device control, users, tenants, audit, and the broader platform APIs. Use dtmSpec for Digital Twin Manager work such as schema definitions, asset models, linked series, and DTM asset or definition APIs.

Available in your function:

type OperationInfo = { summary?: string description?: string tags?: string[] parameters?: Array<{ name: string, in: string, required?: boolean, schema?: unknown, description?: string }> requestBody?: { required?: boolean, content?: Record<string, { schema?: unknown }> } responses?: Record<string, { description?: string, content?: Record<string, { schema?: unknown }> }> }

type PathItem = { get?: OperationInfo post?: OperationInfo put?: OperationInfo patch?: OperationInfo delete?: OperationInfo }

type CoreSpec = { paths: Record<string, PathItem> tags?: Array<{ name: string, description?: string }> }

type DtmSpec = { paths: Record<string, PathItem> tags?: Array<{ name: string, description?: string }> }

type SpecsEnabled = { core: boolean dtm: boolean }

declare const coreSpec: CoreSpec declare const dtmSpec: DtmSpec declare const specsEnabled: SpecsEnabled

Your code must evaluate to a zero-parameter function — do NOT declare coreSpec, dtmSpec, or specsEnabled as function parameters. These are already declared as constants in the surrounding scope and are available inside the function body without any argument passing. Writing (dtmSpec) => ... would shadow the global binding with an undefined parameter and produce incorrect results.

The top-level bindings a) coreSpec — use this for the main Cumulocity REST APIs such as inventory, alarms, events, measurements, identity, device control, users, tenants, audit, and the broader platform REST surface

b) dtmSpec — use this for Digital Twin Manager work such as schema definitions, asset models, linked series, and DTM asset or definition APIs

c) specsEnabled — tells you which bundled spec families are enabled for execute policy on this connection

are available automatically. The sandbox assigns your function to a local variable, invokes it, and returns its result.

Recommended shapes (zero parameters — bindings come from scope, not arguments): (() => { ... }) async () => { ... }

If your function returns a string, it is returned as-is. Otherwise the result is returned as JSON text.

The specs exposed by query are the raw bundled OpenAPI snapshots. They are never hidden or rewritten for the current MCP connection policy. The current MCP connection may still block execute calls through restrictions and/or an allow list, so do not assume every operation visible in a spec is executable on this connection. Use specsEnabled to see which bundled spec families are enabled for execute policy on this connection.

Examples: () => specsEnabled

() => { return Object.keys(coreSpec.paths).filter((path) => path.includes('inventory')) }

() => { const results = [] for (const [path, methods] of Object.entries(dtmSpec.paths)) { for (const [method, op] of Object.entries(methods)) { if (op?.tags?.some(tag => tag.toLowerCase().includes('asset'))) { results.push({ method: method.toUpperCase(), path, summary: op.summary }) } } }

return results }

() => { const op = coreSpec.paths['/inventory/managedObjects']?.get return { summary: op?.summary, parameters: op?.parameters, responses: op?.responses } }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesA zero-parameter JavaScript function expression. Do NOT declare `coreSpec`, `dtmSpec`, or `specsEnabled` as function parameters — they are already declared as top-level constants in the surrounding scope and are available in the function body automatically. Writing `(dtmSpec) => ...` would shadow the global binding with an undefined parameter and produce incorrect results. Return the final result from that function. Async functions are supported.
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses that specs are raw snapshots, never rewritten for policy, but execute calls may still be blocked. It explains function scope, async support, return format, and common pitfalls (shadowing bindings). Minor omission: no mention of timeouts or memory limits, but overall transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is quite verbose and contains some redundancy (e.g., listing specs and constants in multiple places). While it is structured and front-loaded, it could be more concise without losing clarity. Adequate but not optimal.

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 complexity of a query tool with a single parameter, the description covers return format, available data structures, binding scope, and examples. It does not mention error handling or execution limits, but for the intended use it is sufficiently complete.

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?

The description adds substantial value beyond the input schema. It explains the zero-parameter function requirement, available constants with types, correct function shapes, and provides multiple examples. Schema coverage is 100% but description deepens understanding significantly.

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 purpose: 'Search the bundled OpenAPI specs by evaluating a JavaScript function.' It distinguishes itself from siblings: 'execute' and 'list-credentials', as it focuses on querying API specification data rather than executing operations or managing credentials.

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

Usage Guidelines4/5

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

The description provides context on which spec to use (coreSpec for main APIs, dtmSpec for Digital Twin Manager) and warns about execution policy restrictions. It does not explicitly compare to sibling tools but implies usage for exploration before using execute. The extensive examples guide proper usage.

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/schplitt/mc8yp'

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