Skip to main content
Glama

search_and_chat

Search the web and receive an AI-generated answer based on live results. Combines web search and chat completion to answer questions with up-to-date information.

Instructions

    Perform web search and then generate a response based on the search results.
    
    This is a convenience tool that combines web_search and chat_completion.
    Requires OLLAMA_API_KEY environment variable to be set for web search.

    Args:
        query: The search query and question to answer.
        search_results: Number of search results to include (default: 3).
        model: Optional model override.
        temperature: Sampling temperature for chat completion.

    Returns:
        JSON-serializable dict with search results and AI response.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNo
queryYes
temperatureNo
search_resultsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

There are no annotations, so the description carries the full burden. It discloses the OLLAMA_API_KEY requirement, the combined search-and-chat behavior, and the return shape. However, it does not mention external service effects, failure modes, latency, or behavior when the API key is missing or invalid.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well structured and front-loaded with the core purpose. The Args and Returns sections are slightly redundant with the provided schema but still concise and useful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool complexity, the description covers purpose, parameters, environment requirements, and return format. Yet it lacks guidance on when to choose this combined tool versus calling web_search or chat_completion separately, and it does not address error handling or operational caveats.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must explain the parameters, and it does so adequately: query, search_results count, optional model override, and temperature. It adds meaningful context beyond the raw schema, though it lacks deeper details like temperature ranges or search_results limits.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool performs a web search and then generates a response, explicitly naming it as a convenience tool that combines web_search and chat_completion. This makes its function and differentiation from siblings immediately understandable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It clearly implies use when both web search and chat generation are needed, and it names the combined components. However, it does not explicitly state when to prefer the separate tools instead, such as when only search or only chat completion is needed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/timscodebase/ollamaMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server