Skip to content
v2.273.0

ToolDefinition Struct ​

Tool definition for inline payload.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrockagentcore as bedrockagentcore } from 'aws-cdk-lib';

declare const schemaDefinition_: bedrockagentcore.SchemaDefinition;
declare const schemaDefinitionType: bedrockagentcore.SchemaDefinitionType;
const toolDefinition: bedrockagentcore.ToolDefinition = {
  description: 'description',
  inputSchema: {
    type: schemaDefinitionType,

    // the properties below are optional
    description: 'description',
    items: schemaDefinition_,
    properties: {
      propertiesKey: schemaDefinition_,
    },
    required: ['required'],
  },
  name: 'name',

  // the properties below are optional
  outputSchema: {
    type: schemaDefinitionType,

    // the properties below are optional
    description: 'description',
    items: schemaDefinition_,
    properties: {
      propertiesKey: schemaDefinition_,
    },
    required: ['required'],
  },
};

Properties ​

descriptionstringdescriptionstrdescriptionStringDescriptionstringDescription*stringrequired#
The description of the tool.

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

inputSchemaSchemaDefinitioninput_schemaSchemaDefinitioninputSchemaSchemaDefinitionInputSchemaSchemaDefinitionInputSchemaSchemaDefinitionrequired#
The input schema for the tool.

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

namestringnamestrnameStringNamestringName*stringrequired#
The name of the tool.

This name identifies the tool in the Model Context Protocol.

outputSchemaSchemaDefinitionoutput_schemaSchemaDefinitionoutputSchemaSchemaDefinitionOutputSchemaSchemaDefinitionOutputSchemaSchemaDefinition= No output schema#
The output schema for the tool.

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