ToolDefinition

class aws_cdk.aws_bedrockagentcore.ToolDefinition(*, description, input_schema, name, output_schema=None)

Bases: object

Tool definition for inline payload.

Parameters:
  • description (str) – The description of the tool. This description provides information about the purpose and usage of the tool.

  • input_schema (Union[SchemaDefinition, Dict[str, Any]]) – The input schema for the tool. This schema defines the structure of the input that the tool accepts.

  • name (str) – The name of the tool. This name identifies the tool in the Model Context Protocol.

  • output_schema (Union[SchemaDefinition, Dict[str, Any], None]) – The output schema for the tool. This schema defines the structure of the output that the tool produces. Default: - No output schema

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrockagentcore as bedrockagentcore

# schema_definition_: bedrockagentcore.SchemaDefinition
# schema_definition_type: bedrockagentcore.SchemaDefinitionType

tool_definition = bedrockagentcore.ToolDefinition(
    description="description",
    input_schema=bedrockagentcore.SchemaDefinition(
        type=schema_definition_type,

        # the properties below are optional
        description="description",
        items=schema_definition_,
        properties={
            "properties_key": schema_definition_
        },
        required=["required"]
    ),
    name="name",

    # the properties below are optional
    output_schema=bedrockagentcore.SchemaDefinition(
        type=schema_definition_type,

        # the properties below are optional
        description="description",
        items=schema_definition_,
        properties={
            "properties_key": schema_definition_
        },
        required=["required"]
    )
)

Attributes

description

The description of the tool.

This description provides information about the purpose and usage of the tool.

input_schema

The input schema for the tool.

This schema defines the structure of the input that the tool accepts.

name

The name of the tool.

This name identifies the tool in the Model Context Protocol.

output_schema

The output schema for the tool.

This schema defines the structure of the output that the tool produces.

Default:
  • No output schema