SearchService#

class scikitplot.mcp.SearchService(retriever, *, max_concurrency=4, acquire_timeout_seconds=0.05)[source]#

Wire adapter: bounded, validated search returning pydantic tool models.

Parameters:
retrieverDocsRetriever

Any object implementing search(query, k).

max_concurrencyint, optional

Maximum number of in-flight searches (1-128, default 4).

acquire_timeout_secondsfloat, optional

How long to wait for a concurrency slot (default 0.05).

Parameters:

See also

scikitplot.mcp.SearchCoordinator

The Tier-L orchestration this wraps.

Notes

Developer-focused. Run M05 decided Option A: the neutral orchestration lives at Tier-L in SearchCoordinator, and this class is the server-tier adapter that turns its plain dictionaries into pydantic models for the MCP wire. Validation and concurrency bounds are not reimplemented here — behaviour is inherited from the coordinator, so the two cannot drift.

Callers that do not need wire models (framework integrations, the Legacy Retrieval tier) should use SearchCoordinator directly and avoid the [mcp] extra entirely.

search(query, k=5)[source]#

Search and return the validated wire model.

Parameters:
querystr

Query text.

kint, optional

Maximum passages to return.

Returns:
SearchDocsOutput
Parameters:
Return type:

SearchDocsOutput