Ask for the best x402/MCP services for an agent intent. This is the high-level discovery tool: it retrieves candidates from the directory, asks the configured backend LLM to rank only those candidates, and returns service cards for the selected recommendations. If the LLM is unavailable, it falls...
Part of the agent-tools (x402 + MCP + A2A directory) server.
Free to start. No card required.
AI agents call ask_services to retrieve information from agent-tools (x402 + MCP + A2A directory) without modifying any data. This is common in research, monitoring, and reporting workflows where the agent needs context before taking action. Because read operations don't change state, they are generally safe to allow without restrictions -- but you may still want rate limits to control API costs.
Even though ask_services only reads data, uncontrolled read access can leak sensitive information or rack up API costs. An agent caught in a retry loop could make thousands of calls per minute. A rate limit gives you a safety net without blocking legitimate use.
Read-only tools are safe to allow by default. No rate limit needed unless you want to control costs.
{
"version": "1",
"default": "deny",
"tools": {
"ask_services": {}
}
} See the full agent-tools (x402 + MCP + A2A directory) policy for all 10 tools.
These attack patterns abuse exactly the kind of access ask_services gives an agent. Each links to the full case and the policy that stops it:
Other read tools across the catalogue. The same approach applies to each: allow, with a rate cap to control cost.
Ask for the best x402/MCP services for an agent intent. This is the high-level discovery tool: it retrieves candidates from the directory, asks the configured backend LLM to rank only those candidates, and returns service cards for the selected recommendations. If the LLM is unavailable, it falls back to the directory ranker. Args: intent: Natural-language job the agent wants to accomplish. top_k: Max recommendations to return (1-10). max_price_usd: Optional per-call budget cap. category: Optional directory category filter. chain: Optional payment network filter, e.g. "base" or "solana". require_healthy: When true, only consider services marked health=ok. min_confidence: Optional x402scan quality floor (0.0-1.0). has_mcp: When true, only consider services with MCP endpoints. use_llm: Set false for deterministic retrieval-only fallback.. It is categorised as a Read tool in the agent-tools (x402 + MCP + A2A directory) MCP Server, which means it retrieves data without modifying state.
Register the agent-tools (x402 + MCP + A2A directory) MCP server in PolicyLayer and add a rule for ask_services: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches agent-tools (x402 + MCP + A2A directory). Nothing to install.
ask_services is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the ask_services rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for ask_services. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
ask_services is provided by the agent-tools (x402 + MCP + A2A directory) MCP server (pypi:agent-tools-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Deterministic rules across all 10 agent-tools (x402 + MCP + A2A directory) tools. Per-identity grants. Full audit log. Live in minutes. Nothing to install.
Free to start. No card required.
4,600+ MCP servers and 31,000+ tools scanned and risk-classified.