Skip to main content
Glama
florenciakabas

xai-toolkit

retrieve_business_context

Retrieve relevant business documents and protocols from the knowledge base to provide actionable guidance after model predictions. Returns ranked chunks with source provenance for informed decision-making.

Instructions

Retrieve relevant business context from the knowledge base.

Searches loaded business documents (e.g., clinical protocols, operational
rules) for sections relevant to the query. Returns ranked chunks with
source provenance for the Glass Floor presentation pattern.

Use this AFTER an explainability tool to find actionable business guidance.
For example, after explain_prediction returns a high-probability malignant
classification, call this with a query like 'high risk malignant biopsy'
to retrieve the relevant clinical protocol sections.

The provenance_label is always 'ai-interpreted' — any synthesis from
these chunks by the LLM is NOT deterministic and must be clearly
distinguished from grounded tool outputs.

Args:
    query: Natural language search query (e.g., 'high risk biopsy referral').
    top_k: Maximum number of chunks to return (default: 5).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
top_kNo
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behavioral traits: the search scope ('loaded business documents'), return format ('ranked chunks with source provenance'), presentation pattern ('Glass Floor presentation pattern'), and important limitations ('provenance_label is always ai-interpreted', 'any synthesis... is NOT deterministic'). It doesn't mention rate limits or authentication needs, but covers most critical behavioral aspects.

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?

The description is well-structured and appropriately sized. It begins with the core purpose, then explains the search behavior, specifies usage guidelines with examples, and concludes with important behavioral notes. Every sentence adds value, with no redundant information or unnecessary elaboration.

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?

For a tool with no annotations and no output schema, the description provides strong contextual completeness. It covers purpose, usage guidelines, behavioral traits, and parameter semantics effectively. The main gap is the lack of information about the exact structure of returned chunks, but given the complexity level and the clear explanation of what will be returned ('ranked chunks with source provenance'), this is a minor omission.

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

Parameters5/5

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

With 0% schema description coverage, the description must fully compensate for the lack of parameter documentation in the schema. It successfully provides clear semantics for both parameters: 'query' is explained as 'Natural language search query' with examples, and 'top_k' is explained as 'Maximum number of chunks to return' with its default value. The description adds substantial value beyond the bare schema.

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's purpose with specific verbs ('retrieve relevant business context', 'searches loaded business documents') and resources ('knowledge base', 'business documents like clinical protocols, operational rules'). It distinguishes itself from siblings by focusing on business context retrieval rather than model explanation, comparison, or listing functions.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool ('Use this AFTER an explainability tool to find actionable business guidance') and gives a concrete example with a specific sibling tool ('after explain_prediction returns...'). It also specifies the intended workflow context clearly.

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/florenciakabas/xai-mcp'

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