Skip to main content

Function: getApiHeaders()

getApiHeaders(): Record<string, string>

Defined in: context.ts:33

Returns the headers getApiHeaders produced for the current MCP request — the same headers apiCall injects. Use it inside a tool handler that runs its own HTTP client instead of apiCall, so caller credentials still reach the upstream API.

Returns {} outside a request, or when getApiHeaders is not configured.

Returns​

Record<string, string>