Skip to main content
Glama
Procurement MCP

Procurement MCP

by belikh

search_history

Retrieve past procurement searches from a Postgres log or cache, newest first, to review query history or reuse unexpired cached results.

Instructions

Read past searches from the Postgres search log or cache, newest first.

Needs DATABASE_URL. Without a database the server keeps no history.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoCap on rows returned
sourceNolog: every past search with its result count and time. cache: unexpired cached results.log
since_hoursNoHow far back to look
include_offersNocache only: include the cached offers in each row. Default: counts only.
query_containsNoKeep only searches whose query contains this text

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does disclose that this is a read operation, that results are ordered newest first, and that the tool silently yields nothing when no database is configured — the most important operational caveat. It stops short of describing pagination behavior or whether results span all users, but the safety and prerequisite profile is covered.

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?

Two short sentences, zero filler, and the core operation is front-loaded before the prerequisite caveat. Nothing could be removed without losing information.

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?

An output schema exists, so return shape need not be explained, and the description covers the one thing structured fields cannot: the DATABASE_URL requirement and the empty-history fallback. Minor gap in not clarifying pagination or scope across users/workspaces, but the definition is sufficient to invoke the tool correctly.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter including the log/cache enum and include_offers is already documented structurally; the baseline of 3 applies. The description's only added parameter-adjacent meaning is the "newest first" ordering, which is genuinely useful but small.

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

Purpose4/5

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

The description opens with a specific verb+resource ("Read past searches from the Postgres search log or cache") and states both sources, so an agent immediately knows this retrieves historical query records. It does not explicitly contrast itself with any sibling, though none of the listed siblings (get_price_history, search_offers, latest_deals) clearly overlaps, so the ambiguity is small.

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

Usage Guidelines3/5

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

It gives an important prerequisite (needs DATABASE_URL; no database means no history), which is real usage-shaping guidance. However, it offers no when-to-use/when-not guidance relative to alternatives and does not say when to prefer the log source over the cache source in prose — that distinction is left entirely to the schema enum text.

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