Skip to contents

Use ToolConfig() as ConsoleConfig(tool = ...) to replace tool prose or hide parameters for evaluations. Descriptions are used verbatim, including empty strings. Omitted fields retain generated text or inherited settings.

Usage

ToolParameterConfig(
  description = NULL,
  enabled = NULL,
  parameters = NULL,
  schema = NULL
)

ToolConfig(description = NULL, instructions = NULL, parameters = NULL)

Arguments

description

NULL or one string replacing the complete tool or parameter description.

enabled

NULL, TRUE, or FALSE; controls parameter visibility.

parameters

NULL or a named list of ToolParameterConfig() objects. Nest another parameters list to configure fields inside an object parameter.

schema

NULL or a JSON-ready list of read-only type and constraint metadata populated by resolve_console_config(). Native validation rejects changes to the parameter's types or constraints.

instructions

NULL or one string replacing MCP initialization instructions: server guidance received when the client connects, which some clients use for deferred tool search. The tool and parameter descriptions are returned later through tools/list. The ellmer adapter uses those descriptions and does not add initialization instructions to the chat prompt.

Value

An S7 configuration object. The constructor is also its S7 class.

Details

ToolParameterConfig(enabled = FALSE) removes a parameter from the exposed signature and rejects calls supplying it. Omission keeps its runtime default; hiding timeout_ms retains the 60,000 ms wait budget.

Parameter names must exist in the schema selected by ConsoleConfig(languages = ...). Unknown or unavailable parameters and nested parameters under scalar fields fail launch. Parameter types and runtime defaults cannot be replaced.

Examples

ConsoleConfig(tool = ToolConfig(
  description = "Run R code in a persistent session.",
  parameters = list(
    r = ToolParameterConfig(description = "Execute one complete R cell."),
    timeout_ms = ToolParameterConfig(enabled = FALSE)
  )
))