spring-projects/spring-ai · warning
No complete methods found in the provided complete objects:
Error message
No complete methods found in the provided complete objects: <completeObjects>
What it means
AsyncStatelessMcpCompleteProvider.getCompleteSpecifications() scans the supplied complete objects for completion-annotated methods suitable for a stateless async server. If the resulting completeSpecs list is empty, it warns that no complete methods were found. The server is built without completions, so client completion requests return nothing.
Source
Thrown at mcp/mcp-annotations/src/main/java/org/springframework/ai/mcp/annotation/provider/complete/AsyncStatelessMcpCompleteProvider.java:94
var completeAnnotation = mcpCompleteMethod.getAnnotation(McpComplete.class);
var completeRef = CompleteAdapter.asCompleteReference(completeAnnotation, mcpCompleteMethod);
BiFunction<McpTransportContext, CompleteRequest, Mono<CompleteResult>> methodCallback = AsyncStatelessMcpCompleteMethodCallback
.builder()
.method(mcpCompleteMethod)
.bean(completeObject)
.complete(completeAnnotation)
.build();
return new AsyncCompletionSpecification(completeRef, methodCallback);
})
.toList())
.flatMap(List::stream)
.toList();
if (completeSpecs.isEmpty()) {
if (logger.isWarnEnabled()) {
logger.warn("No complete methods found in the provided complete objects: " + this.completeObjects);
}
}
return completeSpecs;
}
/**
* Returns the methods of the given bean class.
* @param bean the bean instance
* @return the methods of the bean class
*/
protected Method[] doGetClassMethods(Object bean) {
return bean.getClass().getDeclaredMethods();
}
}
View on GitHub (pinned to 98a7beda4f)
Solutions
- Add @McpComplete annotations with correct prompt references to at least one method per complete object
- Confirm the methods satisfy the stateless async scan (reactive return types, expected argument shape)
- Log or inspect completeObjects passed to the builder to confirm the intended instances are registered
Example fix
// before
public class MyCompletes { List<String> complete(String p) { return List.of(); } }
// after
public class MyCompletes {
@McpComplete(prompt = "my-prompt")
public Mono<List<String>> complete(String p) { return Mono.just(List.of("suggestion")); }
} Defensive patterns
Strategy: validation
Validate before calling
boolean hasComplete = java.util.Arrays.stream(completeObject.getClass().getDeclaredMethods())
.anyMatch(m -> m.isAnnotationPresent(McpComplete.class));
if (!hasComplete) {
throw new IllegalStateException("No @McpComplete methods on " + completeObject + " for stateless server");
} Type guard
static boolean hasAnnotatedCompleteMethods(Object o) {
return java.util.Arrays.stream(o.getClass().getDeclaredMethods())
.anyMatch(m -> m.isAnnotationPresent(McpComplete.class));
} Prevention
- Ensure at least one @McpComplete-annotated method per registered complete object
- Match signatures to the stateless async scan (reactive return types)
- Watch startup logs for the 'No complete methods found' warning
When it happens
Trigger: Passing completion provider objects to a stateless async MCP server where no method matches the completion annotation/scan rules (missing @McpComplete, wrong signature, or non-matching reactive types).
Common situations: Migrating completion providers from a stateful to a stateless server where scan rules differ; forgetting the annotation; using methods with imperative signatures in a reactive scan.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- No async complete methods found in the provided complete obj
- Stateless servers doesn't support bidirectional parameters.
- No complete methods found in the provided complete objects:
- Either prompt or uri must be provided in McpComplete annotat
- Only one of prompt or uri can be provided in McpComplete ann
AI-assisted analysis of spring-projects/spring-ai@98a7beda4f (2026-09-11).
Data as JSON: /api/errors/b239bc89c8b9de0c.
Report an issue: GitHub.