Skip to content

Instantly share code, notes, and snippets.

@jozkee
Created April 3, 2026 05:03
Show Gist options
  • Select an option

  • Save jozkee/b9256ae3a15d758e49408d501db4e9eb to your computer and use it in GitHub Desktop.

Select an option

Save jozkee/b9256ae3a15d758e49408d501db4e9eb to your computer and use it in GitHub Desktop.

Tool Output Types -- Cross-Provider Inventory

OpenAI (12 output types)

Resource/ItemParam variants (e.g., FunctionToolCallOutputResource, ApplyPatchToolCallOutputItemParam) are the same shape at different API boundaries -- omitted for simplicity.

Wire Type Role Family In MEAI? Wire output property
FunctionToolCallOutput output function Yes (FunctionResultContent) output (string)
CodeInterpreterToolCall call+output code-interpreter Yes (CodeInterpreterToolResultContent) outputs (array of logs/images)
FileSearchToolCall call+output file-search Yes (bare ToolResultContent) results (array of search results)
WebSearchToolCall call+output web-search Yes (WebSearchToolResultContent) action.sources (search results)
ImageGenToolCall call+output image-gen Yes (ImageGenerationToolResultContent) result (base64 image)
MCPToolCall call+output mcp Yes (McpServerToolResultContent) output / error
ComputerToolCallOutput output computer-use Yes (bare ToolResultContent) output (screenshot)
CustomToolCallOutput output custom No (not in SDK) output (string)
ApplyPatchToolCallOutput output apply-patch No (not in SDK) output (string)
FunctionShellCallOutput output function-shell No (not in SDK) output (stdout/stderr)
LocalShellToolCallOutput output local-shell No (not in SDK) output (string)
ToolSearchOutput output tool-search No (not in SDK) tools (metadata)

Azure Foundry (12 output types)

All outputs use output: anyOf(Object, String, Array) -- opaque BinaryData.

Wire Type Role Family Wire output property
A2AToolCallOutput output a2a output (opaque)
AzureAISearchToolCallOutput output azure-ai-search output (opaque)
AzureFunctionToolCallOutput output azure-function output (opaque)
BingCustomSearchToolCallOutput output bing-custom-search output (opaque)
BingGroundingToolCallOutput output bing-grounding output (opaque)
BrowserAutomationToolCallOutput output browser-automation output (opaque)
FabricDataAgentToolCallOutput output fabric-data-agent output (opaque)
OpenApiToolCallOutput output openapi output (opaque)
SharepointGroundingToolCallOutput output sharepoint-grounding output (opaque)
MemorySearchToolCallItemResource call+output memory-search results (array)
OAuthConsentRequestOutputItem output oauth-consent consent_link (url)
WorkflowActionOutputItem output workflow-action (metadata only)

Anthropic (8 output types)

All results use envelope/payload pattern: the ToolResultBlock has content containing typed child blocks. All types carry a Beta prefix in the current spec.

Wire Type Role Family In MEAI adapter? Wire output property
RequestToolResultBlock output function Yes (outbound only) content (array of blocks)
ResponseMCPToolResultBlock output mcp No content (array of blocks)
ResponseBashCodeExecutionToolResultBlock output bash-code-execution No content (stdout, stderr)
ResponseCodeExecutionToolResultBlock output code-execution No content (stdout, stderr)
ResponseTextEditorCodeExecutionToolResultBlock output text-editor No content (view/edit results)
ResponseToolSearchToolResultBlock output tool-search No content (tool_references)
ResponseWebFetchToolResultBlock output web-fetch No content (url, text)
ResponseWebSearchToolResultBlock output web-search No content (search results)

Gemini (3 output types)

Wire Type Role Family In MEAI adapter? Wire output property
FunctionResponse output function Outbound only response (JSON object)
CodeExecutionResult output code-execution Yes (CodeInterpreterToolResultContent) output (string)
ToolResponse output generic-server-tool No response (JSON object)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment