Interface: CreateInProcessCallApiArgs
Defined in: http-server-mcp-openapi/src/inProcessCallApi.ts:10
Properties
app
app:
__module| (() =>__module|Promise<__module>)
Defined in: http-server-mcp-openapi/src/inProcessCallApi.ts:16
The Koa app serving the REST API the tools were generated from, or a function returning it — for an app that mounts the MCP router itself and so is not built yet when the tools are registered.
headers?
optionalheaders?: (request) =>Record<string,string|undefined>
Defined in: http-server-mcp-openapi/src/inProcessCallApi.ts:21
Headers added to every dispatched request, after the ones the MCP request carried — e.g. a marker that tells a request log the call came from a tool.
Parameters
| Parameter | Type |
|---|---|
request | ResolvedRequest |
Returns
Record<string, string | undefined>
toError?
optionaltoError?: (response,request) =>Error
Defined in: http-server-mcp-openapi/src/inProcessCallApi.ts:29
Builds the error a non-2xx response throws. The default is an ApiError
carrying the status and body, with the message read out of the common
error envelopes (see errorMessageOf); registerTools answers it
with the envelope as structuredContent. Return an ApiError here to
keep that.
Parameters
| Parameter | Type |
|---|---|
response | InProcessResponse |
request | ResolvedRequest |
Returns
Error