Skip to main content

Interface: OpenApiToToolsOptions

Defined in: http-server-mcp-openapi/src/types.ts:160

Options that tune how operations and body properties are translated.

Properties​

argumentNames?​

optional argumentNames?: "camelCase" | "verbatim"

Defined in: http-server-mcp-openapi/src/types.ts:193

How tool argument names are derived from the spec's parameter and body-property names.

  • 'camelCase' folds _ / - separators (agent_id → agentId) and maps them back when building the request.
  • 'verbatim' uses the spec's names unchanged, so the MCP contract matches the REST contract exactly.

Default​

'camelCase'

describe?​

optional describe?: (args) => string

Defined in: http-server-mcp-openapi/src/types.ts:227

Builds each tool's description from its operation. The default is the operation's description, flattened to one line.

Parameters​

ParameterTypeDescription
args{ method: string; operation: OperationSpec; pathTemplate: string; }-
args.methodstringUppercase HTTP method.
args.operationOperationSpec-
args.pathTemplatestring-

Returns​

string

Example​

describe: ({ operation, method, pathTemplate }) =>
`${operation.summary}\n\n${operation.description}\n\n(${method} ${pathTemplate})`,

documents?​

optional documents?: OpenApiDocuments

Defined in: http-server-mcp-openapi/src/types.ts:201

Documents that $refs with a file part resolve against, keyed by that file part as the spec writes it — ./tags.yaml for ./tags.yaml#/components/schemas/Tag. Refs inside a document resolve relative to that document. A ref to a file absent from this map resolves to an empty schema, which accepts any value.


excludeExtension?​

optional excludeExtension?: string

Defined in: http-server-mcp-openapi/src/types.ts:166

Operation-level extension flag that, when truthy, excludes the operation from the generated tool surface.

Default​

'x-mcp-exclude'

schemaDetail?​

optional schemaDetail?: "compact" | "full"

Defined in: http-server-mcp-openapi/src/types.ts:216

How much of each parameter's and body property's schema reaches the tool's inputSchema.

  • 'compact' keeps the type, items and description of each top-level argument, with descriptions flattened to one line.
  • 'full' keeps the whole schema — enum, format, pattern, minimum, default, nested properties and required, oneOf — and changes only what JSON Schema cannot say: allOf is merged, nullable becomes a 'null' type (and joins an enum), and OpenAPI-only keywords and x- extensions are dropped. Descriptions stay verbatim.

Default​

'compact'

serverManagedExtension?​

optional serverManagedExtension?: string | string[]

Defined in: http-server-mcp-openapi/src/types.ts:181

Extension flag that, when truthy, hides a value the server sets from the generated inputSchema.

  • On a request-body property, the property stays in acceptedBodyFields and is never sent (the API sets it itself).
  • On a path or query parameter, the parameter is listed in serverManagedParameters and the consumer supplies its value. A string extension value ('true') pins it: the builders always send that value.

Several names may be given; a node flagged by any of them is managed.

Default​

'x-mcp-server-managed'