This endpoint allows you to retrieve structured responses from a specific AI model, based on the input parameters
AI agents call ai_optimization_llm_response to retrieve information from Dataforseo without modifying anything — typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
top_p | number | — | diversity of the AI response, optional field, controls diversity of the response by limiting token selection; |
llm_type | string | Yes | type of llm. Must be one of: 'claude', 'gemini', 'chat_gpt', 'perplexity' |
model_name | string | Yes | name of the AI model. consists of the actual model name and version name. if not sure which model to use, first call the ai_optimization_llm_models tool to get |
web_search | boolean | — | enable web search for current information. When enabled, the AI model can access and cite current web information; |
temperature | number | — | randomness of the AI response optional field higher values make output more diverse; lower values make output more focused; |
user_prompt | string | Yes | Prompt for the AI model. The question or task you want to send to the AI model. You can specify up to 500 characters in the user_prompt field |
Parameters from the server's own tool schema.
This tool queries an AI model and returns responses without creating side effects, modifying data, executing arbitrary commands, or affecting financial systems. It is a straightforward Read operation with minimal blast radius if misused — an agent could make unwanted API calls or retrieve unintended data, but cannot corrupt, delete, or execute harmful operations through this tool alone.
From the tool's definition Tool description states it 'allows you to retrieve structured responses from a specific AI model' — a retrieval operation with no modification, deletion, or execution of external code.
Attacks that exploit this kind of access
This endpoint allows you to retrieve structured responses from a specific AI model, based on the input parameters. It is categorised as a Read tool in the Dataforseo MCP Server, which means it retrieves data without modifying state.
ai_optimization_llm_response accepts 6 parameters: top_p, llm_type, model_name, web_search, temperature, user_prompt. Required: llm_type, model_name, user_prompt. The full parameter table on this page comes from the server's own tool schema.
Register the Dataforseo MCP server in PolicyLayer and add a rule for ai_optimization_llm_response: 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 Dataforseo. Nothing to install.
ai_optimization_llm_response 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 ai_optimization_llm_response 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 ai_optimization_llm_response. 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.
ai_optimization_llm_response is provided by the Dataforseo MCP server (dataforseo-mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.