Skip to main content

Interface: StatefulTemporalMCPServer

openaiAgentsWorkflow.StatefulTemporalMCPServer

Stateful variant of MCPServer. Adds cleanup() — the documented lifecycle method users invoke from finally blocks after connect().

Hierarchy​

  • MCPServer

    ↳ StatefulTemporalMCPServer

Properties​

cacheToolsList​

• cacheToolsList: boolean

Inherited from​

MCPServer.cacheToolsList


customDataExtractor​

• Optional customDataExtractor: MCPToolCustomDataExtractor

Inherited from​

MCPServer.customDataExtractor


errorFunction​

• Optional errorFunction: null | MCPToolErrorFunction

Optional function to convert MCP tool failures into model-visible messages. Set to null to rethrow errors instead of converting them.

Inherited from​

MCPServer.errorFunction


name​

• Readonly name: string

Inherited from​

MCPServer.name


toolFilter​

• Optional toolFilter: MCPToolFilterCallable | MCPToolFilterStatic

Inherited from​

MCPServer.toolFilter


toolMetaResolver​

• Optional toolMetaResolver: MCPToolMetaResolver

Inherited from​

MCPServer.toolMetaResolver


useStructuredContent​

• Optional useStructuredContent: boolean

Whether to use MCP structuredContent as the model-visible tool output when available. Defaults to false to preserve the existing content-based output behavior.

Inherited from​

MCPServer.useStructuredContent

Methods​

callTool​

▸ callTool(toolName, args, meta?, options?): Promise<CallToolResultContent>

Parameters​

NameType
toolNamestring
argsnull | Record<string, unknown>
meta?null | Record<string, unknown>
options?MCPCallToolOptions

Returns​

Promise<CallToolResultContent>

Inherited from​

MCPServer.callTool


callToolResult​

▸ callToolResult(toolName, args, meta?, options?): Promise<{ _meta?: Record<string, unknown> ; content: { [key: string]: unknown; type: string }[] ; isError?: boolean ; structuredContent?: Record<string, unknown> }>

Invoke a tool and return the full serializable MCP result.

Parameters​

NameType
toolNamestring
argsnull | Record<string, unknown>
meta?null | Record<string, unknown>
options?MCPCallToolOptions

Returns​

Promise<{ _meta?: Record<string, unknown> ; content: { [key: string]: unknown; type: string }[] ; isError?: boolean ; structuredContent?: Record<string, unknown> }>

Inherited from​

MCPServer.callToolResult


cleanup​

▸ cleanup(): Promise<void>

Returns​

Promise<void>


close​

▸ close(): Promise<void>

Returns​

Promise<void>

Inherited from​

MCPServer.close


connect​

▸ connect(): Promise<void>

Returns​

Promise<void>

Inherited from​

MCPServer.connect


invalidateToolsCache​

▸ invalidateToolsCache(): Promise<void>

Returns​

Promise<void>

Inherited from​

MCPServer.invalidateToolsCache


listTools​

▸ listTools(): Promise<{ description?: string ; inputSchema: { additionalProperties: boolean ; properties: Record<string, any> ; required: string[] ; type: "object" } ; name: string }[]>

Returns​

Promise<{ description?: string ; inputSchema: { additionalProperties: boolean ; properties: Record<string, any> ; required: string[] ; type: "object" } ; name: string }[]>

Inherited from​

MCPServer.listTools