Skip to main content
Glama
WarinChi

ranger-rag-mcp

by WarinChi

query_knowledge_base

Verifies user read access via Apache Ranger before querying a RAG knowledge base. Returns answers with sources if permitted, otherwise denies access.

Instructions

Query a RAG knowledge base with Ranger authorization check.

First checks Apache Ranger to verify the user has 'read' access to the specified knowledge base. If allowed, forwards the query to RAG Studio and returns the answer. If denied, returns an access denied message.

Args: user: Username to check permissions for (e.g., 'alice', 'bob'). knowledge_base: Name of the knowledge base to query (e.g., 'Finance KB', 'HR Policies'). query: The question to ask the knowledge base.

Returns: If authorized: The RAG response with answer and sources. If denied: An access denied message with the reason.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userYes
queryYes
knowledge_baseYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description fully discloses behavior: it checks Ranger read access, conditionally forwards to RAG Studio, returns an access denied message on failure, and describes the return values for both paths. This is rich and transparent.

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 with an intro, a flow explanation, and clearly labeled Args and Returns sections. Each sentence adds valuable information, and the length is appropriate for the tool's complexity.

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

Completeness5/5

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

The description fully covers the tool's purpose, authorization flow, parameters, and return values. Given the absence of annotations and the complexity involving RAG and Ranger, this description is complete and self-sufficient.

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?

The description includes an Args section that explains each parameter with examples (user, knowledge_base, query), adding meaningful semantics beyond the bare input schema. It even outlines the return behavior based on authorization, which ties to parameters.

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 states a specific verb ('Query') and resource ('RAG knowledge base'), and distinguishes itself from siblings by explicitly mentioning the Ranger authorization check. It clearly communicates the core action and scope.

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?

The description clearly explains the tool's context: it performs an authorization check before querying, and describes authorization flow. It does not explicitly mention when to use this tool instead of siblings like check_access, but it provides sufficient context for an agent to decide.

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/WarinChi/ranger-rag-mcp'

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