Class InlineToolSchema

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.bedrockagentcore.ToolSchema
software.amazon.awscdk.services.bedrockagentcore.InlineToolSchema
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.129.0 (build eaca441)", date="2026-05-19T08:18:44.451Z") @Stability(Stable) public class InlineToolSchema extends ToolSchema
Class to define a Tool Schema from an inline string.

The schema can be provided directly as a string in either JSON or YAML format.

Example:

 InlineToolSchema toolSchema = ToolSchema.fromInline(List.of(ToolDefinition.builder()
         .name("hello_world")
         .description("A simple hello world tool")
         .inputSchema(SchemaDefinition.builder()
                 .type(SchemaDefinitionType.OBJECT)
                 .properties(Map.of(
                         "name", SchemaDefinition.builder()
                                 .type(SchemaDefinitionType.STRING)
                                 .description("The name to greet")
                                 .build()))
                 .required(List.of("name"))
                 .build())
         .build()));
 
  • Constructor Details

    • InlineToolSchema

      protected InlineToolSchema(software.amazon.jsii.JsiiObjectRef objRef)
    • InlineToolSchema

      protected InlineToolSchema(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • InlineToolSchema

      @Stability(Stable) public InlineToolSchema(@NotNull List<ToolDefinition> schema)
      Parameters:
      schema - This parameter is required.
  • Method Details

    • bind

      @Stability(Stable) public void bind(@NotNull software.constructs.Construct scope)
      Bind the schema to a construct.

      Specified by:
      bind in class ToolSchema
      Parameters:
      scope - This parameter is required.
    • grantPermissionsToRole

      @Stability(Stable) public void grantPermissionsToRole(@NotNull IRole _role)
      Grant permissions to the role.

      Specified by:
      grantPermissionsToRole in class ToolSchema
      Parameters:
      _role - This parameter is required.