Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,8 @@ Bind a fixed value to a tool object.
```java
client.loadTool("get-toy-price").thenCompose(tool -> {
// Bind 'currency' to 'USD' permanently for this tool instance
tool.bindParam("currency", "USD");

// Now invoke without specifying currency
return tool.execute(Map.of("description", "lego set"));
return tool.bindParam("currency", "USD").execute(Map.of("description", "lego set"));
});
```

Expand All @@ -411,10 +409,9 @@ Instead of a static value, you can bind a parameter to a synchronous or asynchro
```java
client.loadTool("check-order-status").thenCompose(tool -> {
// Bind 'user_id' to a function that fetches the current user from context
tool.bindParam("user_id", () -> SecurityContext.getCurrentUser().getId());

// Invoke: The SDK will call the supplier to fill 'user_id'
return tool.execute(Map.of("order_id", "12345"));
return tool.bindParam("user_id", () -> SecurityContext.getCurrentUser().getId())
.execute(Map.of("order_id", "12345"));
});
```

Expand Down
2 changes: 1 addition & 1 deletion demo-applications/cymbal-transit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<dependency>
<groupId>com.google.cloud.mcp</groupId>
<artifactId>mcp-toolbox-sdk-java</artifactId>
<version>0.2.0</version>
<version>0.2.1-SNAPSHOT</version>
</dependency>

<!-- Java Annotations -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ public static void main(final String[] args) throws Exception {
// Start the Spring Boot application.
app.run(args);
logger.info(
"Hello from Cloud Run! The container started successfully and is listening for HTTP requests on " + port);
"Hello from Cloud Run! The container started successfully and is listening for HTTP"
+ " requests on "
+ port);
}
}
Loading
Loading