# ToolDefinition

Tool definition for inline payload.

- Source: [`aws-bedrockagentcore/lib/gateway/targets/schema/tool-schema.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-bedrockagentcore/lib/gateway/targets/schema/tool-schema.ts#L115)
- Type last changed: v2.255.0 · 19 May 2026

## 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

- `description`: string (required) — The description of the tool.

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

- `inputSchema`: [SchemaDefinition](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.SchemaDefinition.html) (required) — The input schema for the tool.

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

- `name`: string (required) — The name of the tool.

  This name identifies the tool in the Model Context Protocol.

- `outputSchema`: [SchemaDefinition](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.SchemaDefinition.html) — The output schema for the tool.

  **Default:** No output schema

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