Skip to content

Commit 33d1451

Browse files
committed
Rename ToolRegistration to ToolSpecification
Signed-off-by: jitokim <[email protected]>
1 parent 81b715b commit 33d1451

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

auto-configurations/mcp/spring-ai-autoconfigure-mcp-server/src/test/java/org/springframework/ai/mcp/server/autoconfigure/McpServerAutoConfigurationIT.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,31 +157,31 @@ void serverCapabilitiesConfiguration() {
157157
}
158158

159159
@Test
160-
void toolRegistrationConfiguration() {
160+
void toolSpecificationConfiguration() {
161161
this.contextRunner.withUserConfiguration(TestToolConfiguration.class).run(context -> {
162162
List<SyncToolSpecification> tools = context.getBean("syncTools", List.class);
163163
assertThat(tools).hasSize(1);
164164
});
165165
}
166166

167167
@Test
168-
void resourceRegistrationConfiguration() {
168+
void resourceSpecificationConfiguration() {
169169
this.contextRunner.withUserConfiguration(TestResourceConfiguration.class).run(context -> {
170170
McpSyncServer server = context.getBean(McpSyncServer.class);
171171
assertThat(server).isNotNull();
172172
});
173173
}
174174

175175
@Test
176-
void promptRegistrationConfiguration() {
176+
void promptSpecificationConfiguration() {
177177
this.contextRunner.withUserConfiguration(TestPromptConfiguration.class).run(context -> {
178178
McpSyncServer server = context.getBean(McpSyncServer.class);
179179
assertThat(server).isNotNull();
180180
});
181181
}
182182

183183
@Test
184-
void asyncToolRegistrationConfiguration() {
184+
void asyncToolSpecificationConfiguration() {
185185
this.contextRunner.withPropertyValues("spring.ai.mcp.server.type=ASYNC")
186186
.withUserConfiguration(TestToolConfiguration.class)
187187
.run(context -> {

mcp/common/src/main/java/org/springframework/ai/mcp/McpToolUtils.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public static String prefixedToolName(String prefix, String toolName) {
9696
* Converts a list of Spring AI tool callbacks to MCP synchronous tool specificaiton.
9797
* <p>
9898
* This method processes multiple tool callbacks in bulk, converting each one to its
99-
* corresponding MCP tool registration while maintaining synchronous execution
99+
* corresponding MCP tool specification while maintaining synchronous execution
100100
* semantics.
101101
* @param toolCallbacks the list of tool callbacks to convert
102102
* @return a list of MCP synchronous tool specificaiton
@@ -161,7 +161,7 @@ public static McpServerFeatures.SyncToolSpecification toSyncToolSpecification(To
161161
* </ul>
162162
* @param toolCallback the Spring AI function callback to convert
163163
* @param mimeType the MIME type of the output content
164-
* @return an MCP SyncToolRegistration that wraps the function callback
164+
* @return an MCP SyncToolSpecification that wraps the function callback
165165
* @throws RuntimeException if there's an error during the function execution
166166
*/
167167
public static McpServerFeatures.SyncToolSpecification toSyncToolSpecification(ToolCallback toolCallback,
@@ -204,7 +204,7 @@ public static Optional<McpSyncServerExchange> getMcpExchange(ToolContext toolCon
204204
* Converts a list of Spring AI tool callbacks to MCP asynchronous tool specificaiton.
205205
* <p>
206206
* This method processes multiple tool callbacks in bulk, converting each one to its
207-
* corresponding MCP tool registration while adding asynchronous execution
207+
* corresponding MCP tool specification while adding asynchronous execution
208208
* capabilities. The resulting specifications will execute their tools on a bounded
209209
* elastic scheduler.
210210
* @param toolCallbacks the list of tool callbacks to convert
@@ -231,26 +231,26 @@ public static List<McpServerFeatures.AsyncToolSpecification> toAsyncToolSpecific
231231
}
232232

233233
/**
234-
* Converts a Spring AI tool callback to an MCP asynchronous tool registration.
234+
* Converts a Spring AI tool callback to an MCP asynchronous tool specification.
235235
* <p>
236236
* This method enables Spring AI tools to be exposed as asynchronous MCP tools that
237237
* can be discovered and invoked by language models. The conversion process:
238238
* <ul>
239-
* <li>First converts the callback to a synchronous registration</li>
239+
* <li>First converts the callback to a synchronous specification</li>
240240
* <li>Wraps the synchronous execution in a reactive Mono</li>
241241
* <li>Configures execution on a bounded elastic scheduler for non-blocking
242242
* operation</li>
243243
* </ul>
244244
* <p>
245-
* The resulting async registration will:
245+
* The resulting async specification will:
246246
* <ul>
247247
* <li>Execute the tool without blocking the calling thread</li>
248248
* <li>Handle errors and results asynchronously</li>
249249
* <li>Provide backpressure through Project Reactor</li>
250250
* </ul>
251251
* @param toolCallback the Spring AI tool callback to convert
252-
* @return an MCP asynchronous tool registration that wraps the tool callback
253-
* @see McpServerFeatures.AsyncToolRegistration
252+
* @return an MCP asynchronous tool specification that wraps the tool callback
253+
* @see McpServerFeatures.AsyncToolSpecification
254254
* @see Mono
255255
* @see Schedulers#boundedElastic()
256256
*/

spring-ai-docs/src/main/antora/modules/ROOT/images/mcp/java-mcp-uml-classdiagram.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)