Skip to main content
Glama

refine_search

Adjust existing product searches by adding, removing, or changing filters such as country, price, and category. Modify previous search parameters to update results instantly without re-parsing queries.

Instructions

Refine a previous product search by adding/removing filters. Takes the intent object from a prior search_products response and applies modifications. No new query parsing needed — this is a fast refinement.

Examples:

  • Add a value: { action: "add", field: "values", value: "organic" }

  • Remove a value: { action: "remove", field: "values", value: "vegan" }

  • Change country: { action: "modify", field: "country", value: "Canada" }

  • Set max price: { action: "modify", field: "priceMax", value: 30 }

  • Change category: { action: "modify", field: "category", value: "Beauty" }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
intentYesThe intent object returned from a previous search_products call. Pass it unchanged.
modificationsYesArray of modifications to apply to the intent
marketNoMarket scope override
limitNoMax products to return (1-50)
Behavior3/5

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

With no annotations provided, the description carries the full burden. It adds valuable behavioral context ('fast refinement', 'no new query parsing needed') but omits safety profile (read-only vs. destructive), error handling for invalid intent objects, or idempotency guarantees.

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

Conciseness5/5

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

Every sentence earns its place: purpose statement, input requirement, performance characteristic, then actionable examples. No redundancy. The examples are formatted efficiently and demonstrate the parameter patterns clearly.

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

Completeness4/5

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

Given the tool's workflow complexity (dependency on prior search_products call, nested modification objects), the description adequately covers the main usage pattern and prerequisites. No output schema exists to describe. Minor gap in not addressing error states or invalid modification scenarios.

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 coverage is 100%, establishing a baseline of 3. The description adds significant value through concrete examples showing valid action/field/value combinations (e.g., 'modify' with priceMax vs. 'add' with values), clarifying the semantics of how modifications apply beyond the raw schema definitions.

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?

Specific verb ('Refine') + resource ('product search') with clear scope (adding/removing filters). Explicitly distinguishes from sibling 'search_products' by stating it takes 'the intent object from a prior search_products response' and requires 'no new query parsing'.

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?

Provides clear context on when to use (requires prior search_products response) and implies when not to use ('no new query parsing needed'). However, it does not explicitly state the alternative tool name for new searches, only implying it by referencing search_products as the source of the intent object.

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

Install Server

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/chhavimishra/originselect-mcp-server'

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