Skip to main content

Crate tooltest_core

Crate tooltest_core 

Source
Expand description

Public API types for configuring and reporting tooltest runs.

Re-exports§

pub use schema::parse_call_tool_request;
pub use schema::parse_call_tool_result;
pub use schema::parse_list_tools;
pub use schema::schema_version_label;
pub use schema::SchemaError;
pub use session::SessionDriver;
pub use session::SessionError;

Modules§

schema
session
Error handling strategy for the rmcp-backed session driver.

Structs§

AssertionCheck
A single JSON-pointer based check.
AssertionSet
Declarative JSON assertion DSL container.
CallToolRequestParam
Parameters for calling a tool provided by an MCP server.
CallToolResult
The result of a tool call operation.
CorpusReport
Snapshot of the state-machine corpus.
CoverageLint
Lint: enforces coverage validation rules at run completion.
CoverageReport
Coverage report for state-machine runs.
CoverageWarning
Warning describing a coverage issue in a state-machine run.
ErrorCode
Standard JSON-RPC error codes used throughout the MCP protocol.
ErrorData
Error information for JSON-RPC error responses.
HttpConfig
Configuration for an HTTP-based MCP endpoint.
JsonSchemaDialectCompatLint
Lint: validates tool schema dialects against an allowlist.
JsonSchemaKeywordCompatLint
Lint: reports $defs usage with legacy JSON Schema drafts.
LintDefinition
Definition of a lint instance.
LintFinding
A lint finding emitted during evaluation.
LintSuite
Collection of configured lint rules.
ListLintContext
Context for list-phase lint evaluation.
MaxStructuredContentBytesLint
Lint: enforces a maximum structuredContent byte size per response.
MaxToolsLint
Lint: checks the raw tools/list count against a configured maximum.
McpSchemaMinVersionLint
Lint: enforces a minimum MCP protocol version based on initialize response.
MinimizedSequence
A minimized failing sequence from property-based testing.
MissingStructuredContentLint
Lint: reports missing structuredContent when an output schema exists.
NoCrashLint
Lint: fails the run when any failure occurred.
OutputSchemaCompileLint
Lint: reports output schemas that fail to compile.
PreRunHook
Configuration for a pre-run hook command.
ResponseAssertion
Assertions evaluated against a tool response.
ResponseLintContext
Context for response-phase lint evaluation.
RunConfig
Top-level configuration for executing a tooltest run.
RunFailure
Failure details for a tooltest run.
RunLintContext
Context for run-phase lint evaluation.
RunResult
Results of a tooltest run.
RunWarning
Warning emitted during a tooltest run.
RunWarningCode
Structured warning codes for tooltest runs.
RunnerOptions
Configuration for proptest-driven run behavior.
SchemaConfig
Configuration for MCP schema parsing and validation.
SequenceAssertion
Assertions evaluated against the entire run sequence.
StateMachineConfig
Configuration for state-machine generator behavior.
StdioConfig
Configuration for a stdio-based MCP endpoint.
Tool
A tool that can be used by a model.
TooltestHttpTarget
HTTP transport input configuration.
TooltestInput
Shared tooltest input type for CLI and MCP modes.
TooltestPreRunHook
Pre-run hook input configuration.
TooltestRunConfig
Combined configuration output from shared tooltest input.
TooltestStdioTarget
Stdio transport input configuration.
TooltestTargetHttp
TooltestTargetStdio
UncallableToolCall
Recorded call details for tools with zero successes.

Enums§

AssertionRule
A single assertion rule in the JSON DSL.
AssertionTarget
Payload targets that can be inspected by assertions.
ClientInitializeError
It represents the error that may occur when serving the client.
CoverageRule
Coverage validation rules for state-machine runs.
CoverageWarningReason
Structured reason codes for coverage warnings.
LintConfigSource
Source of the lint configuration for the run.
LintLevel
Severity levels for lint findings.
LintPhase
Phases in which lints are evaluated.
ListToolsError
Errors emitted while listing tools.
RunOutcome
Outcome of a tooltest run.
SchemaVersion
Schema versions supported by the tooltest core.
ServiceError
TooltestTarget
Target configuration input wrapper.
TooltestTargetConfig
Target configuration for a tooltest run.
TraceEntry
A trace entry capturing MCP interactions.

Constants§

DEFAULT_JSON_SCHEMA_DIALECT

Traits§

LintRule
Trait for implementing lint checks.
TraceSink
Receives per-case traces when enabled.

Functions§

default_tooltest_toml
list_tools_http
Lists tools from an HTTP MCP endpoint using the provided configuration.
list_tools_stdio
Lists tools from a stdio MCP endpoint using the provided configuration.
list_tools_with_session
Lists tools from an active session using MCP schema validation.
load_lint_suite
run_http
Execute a tooltest run against an HTTP MCP endpoint.
run_stdio
Execute a tooltest run against a stdio MCP endpoint.
run_with_session
Execute a tooltest run using a pre-initialized session.

Type Aliases§

JsonObject
A JSON object type alias for convenient handling of JSON data.
ToolInvocation
A generated tool invocation.
ToolNamePredicate
ToolPredicate
Predicate callback used to decide whether a tool invocation is eligible.