Skip to main content

Crate codex_tools

Crate codex_tools 

Source
Expand description

Shared tool definitions and Responses API tool primitives that can live outside codex-core.

Structs§

ConversationHistory
Raw response history snapshot available when an extension tool is invoked.
DiscoverablePluginInfo
ExtensionTurnItem
Visible turn items that an extension may publish into the host lifecycle.
FreeformTool
FreeformToolFormat
JsonSchema
Generic JSON-Schema subset needed for our tool definitions.
JsonToolOutput
ListAvailablePluginsToInstallResult
NoopTurnItemEmitter
Turn-item emitter used when a caller does not expose visible item emission.
RequestPluginInstallArgs
RequestPluginInstallEntry
RequestPluginInstallMeta
RequestPluginInstallResult
ResponsesApiNamespace
ResponsesApiTool
ResponsesApiWebSearchFilters
ResponsesApiWebSearchUserLocation
ToolCall
ToolDefinition
Tool metadata and schemas that downstream crates can adapt into higher-level tool specs.
ToolEnvironment
Host-owned turn environment summary visible to extension tools.
ToolName
Identifies a callable tool, preserving the namespace split when the model provides one.
ToolSearchEntry
ToolSearchInfo
ToolSearchSourceInfo
ZshForkConfig

Enums§

AdditionalProperties
Whether additional properties are allowed, and if so, any required schema.
DiscoverableTool
DiscoverableToolAction
DiscoverableToolType
FunctionCallError
Error returned while executing a model-visible tool invocation.
JsonSchemaPrimitiveType
Primitive JSON Schema type names we support in tool definitions.
JsonSchemaType
JSON Schema type supports either a single type name or a union of names.
LoadableToolSpec
ResponsesApiNamespaceTool
ShellCommandBackendConfig
ToolEnvironmentMode
ToolExposure
Controls where a tool is exposed to the model.
ToolPayload
Canonical payload shapes accepted by model-visible tool runtimes.
ToolSpec
When serialized as JSON, this produces a valid “Tool” in the OpenAI Responses API.
ToolUserShellType
UnifiedExecFeatureMode
UnifiedExecShellMode

Constants§

LIST_AVAILABLE_PLUGINS_TO_INSTALL_TOOL_NAME
REQUEST_PLUGIN_INSTALL_APPROVAL_KIND_VALUE
REQUEST_PLUGIN_INSTALL_PERSIST_ALWAYS_VALUE
REQUEST_PLUGIN_INSTALL_PERSIST_KEY
REQUEST_PLUGIN_INSTALL_TOOL_NAME
TOOL_SEARCH_DEFAULT_LIMIT
TOOL_SEARCH_TOOL_NAME

Traits§

ToolExecutor
Shared runtime contract for model-visible tools.
ToolOutput
Model-facing output contract returned by executable tool runtimes.
TurnItemEmitter
Host-provided capability for extension tools to emit visible turn items.

Functions§

all_requested_connectors_picked_up
augment_tool_spec_for_code_mode
Augment tool descriptions with code-mode-specific exec samples.
build_request_plugin_install_elicitation_request
can_request_original_image_detail
coalesce_loadable_tool_specs
code_mode_name_for_tool_name
collect_code_mode_exec_prompt_tool_definitions
collect_code_mode_tool_definitions
collect_request_plugin_install_entries
create_tools_json_for_responses_api
Returns JSON values that are compatible with Function Calling in the Responses API: https://platform.openai.com/docs/guides/function-calling?api-mode=responses
default_namespace_description
dynamic_tool_to_responses_api_tool
filter_request_plugin_install_discoverable_tools_for_client
mcp_call_tool_result_output_schema
mcp_tool_to_deferred_responses_api_tool
mcp_tool_to_responses_api_tool
normalize_output_image_detail
parse_dynamic_tool
parse_mcp_tool
parse_tool_input_schema
Parse the tool input_schema or return an error for invalid schema.
parse_tool_input_schema_without_compaction
Parse a trusted tool input_schema without running large-schema compaction.
request_user_input_available_modes
retain_tail_from_last_n_user_messages
Retains items from the earliest of the last user_message_count user messages through the latest user message.
sanitize_original_image_detail
shell_command_backend_for_features
shell_type_for_model_and_features
tool_definition_to_responses_api_tool
tool_spec_to_code_mode_tool_definition
Convert a supported nested tool spec into the code-mode runtime shape, including the code-mode-specific description sample.
truncate_assistant_output_text_to_token_budget
Truncates assistant output text to a shared token budget across items.
unified_exec_feature_mode_for_features
Returns the unified-exec mode requested by feature policy, before runtime session inputs such as platform, user shell, and zsh-fork binary paths are resolved.
verified_connector_install_completed

Type Aliases§

ToolExecutorFuture
The boxed future returned by ToolExecutor::handle.
TurnItemEmissionFuture
Future returned when an extension tool emits a visible turn-item lifecycle event.