Skip to main content
Glama
sawftware-apps

DocImprint Document Intelligence

Official

Ask Collection

collection.ask
Read-onlyIdempotent

Answer questions by finding relevant information in a document collection and providing a cited answer.

Instructions

Answer a question using RAG over a document collection. Retrieves relevant chunks then synthesizes a cited answer with source attribution. Use when you need a direct answer grounded in your collection documents. For raw matching chunks (without synthesis), use collection.search instead. For single-document Q&A, use url.qa instead. PREREQUISITE: Collection must be populated via collection.add_document and indexed before results appear. Returns: { answer: string, sources: [{ bundle_id, chunk_id }], retrieval: [{ bundle_id, chunk_id, text, score }] } Example prompts:

  • "What are the key terms of the service agreement in my collection?"

  • "Based on my due diligence docs, what are the main risks?"

  • "Answer this question using all documents in the Q4 Contracts collection."

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
questionYesNatural language question to answer from collection documents. Example: "What are the key terms of the service agreement?"
max_chunksNoMax chunks to retrieve for context (default 8). Increase for broad questions, decrease for precision. Example: 12
collection_idYesCollection ID (col_...) returned by collection.create. Example: "col_550e8400-e29b-41d4-a716-446655440000"

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
answerYes
sourcesYes
retrievalYes
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so the description's added context (synthesis process, citation behavior, return structure) is valuable. It also warns that collection must be populated first. It doesn't cover failure modes or rate limits, but for a read-only retrieval tool this is adequate.

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 moderately long but well-structured: main purpose, usage guidance, prerequisite, return type, and examples. It is front-loaded with the core verb and resource. Some redundancy between the first sentence and the 'Use when' clause, but overall efficient.

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 is highly complete for a RAG tool. It covers what it does, when to use it, how it differs from alternatives, prerequisites, and the exact return structure. The output schema already exists, so return values are documented, and the description reinforces them with an example structure.

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%, with each parameter (question, max_chunks, collection_id) having a clear description and example. The description text does not add new parameter-level semantics beyond the schema, but the example prompts illustrate question phrasing. Baseline 3 is appropriate.

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 RAG over a document collection to answer questions with source-attributed synthesis. It explicitly distinguishes itself from collection.search (raw chunks) and url.qa (single-document Q&A), making its purpose unambiguous.

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?

It provides explicit when-to-use guidance ('Use when you need a direct answer grounded in your collection documents') and names specific alternatives with different use cases. It also includes a prerequisite about populating and indexing the collection, which is essential for correct usage.

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/sawftware-apps/docimprint-sdk'

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