Vector-store content retrieval
Stage GovTribe files for semantic retrieval, poll vector-store readiness, and search staged file text with GovTribe MCP tools.
Use vector-store content retrieval when metadata search and content_snippet fields are not enough to answer a file-content question.
This pattern is for government files and user files staged through Add_To_Vector_Store. It is not a GovTribe documentation search or a general GovTribe knowledge base.
When to use vector-store retrieval
Use this pattern when the user needs semantic retrieval from file text, such as:
- requirements, clauses, instructions, or risks buried inside a solicitation attachment
- exact supporting evidence from a user-uploaded file
- concept-level matching across long file text where keyword metadata search is too thin
- a focused answer that depends on retrieved chunks from one or more staged files
Use normal search tools first when file metadata, record fields, or content_snippet values answer the question.
Decide whether to stage files
Prefer the least expensive path that can answer the question.
| User need | Use |
|---|---|
| Find records or files by title, parent record, agency, dates, or metadata. | Search_* tools, Search government files, or Search user files |
| Answer from short snippets already returned by file search. | Search tool response plus cited snippets |
| Read requirements, instructions, clauses, or attachments in detail. | Add_To_Vector_Store then Search_Vector_Store |
| Compare content across several attachments or user files. | Stage the smallest relevant file set, then search the vector store |
| Search GovTribe docs or general product knowledge. | Do not use vector-store content retrieval; use the relevant documentation or MCP tool references |
Before staging files
Resolve the file or file-bearing entity before calling Add_To_Vector_Store.
| Check | Guidance |
|---|---|
| Supported type | Use only govtribe_type values supported by Add to vector store MCP tool. |
| Target scope | Stage the smallest file set that can answer the question. |
| Existing store | Reuse a relevant completed govtribe_vector_store_id when the same corpus is already staged. |
| Metadata-only question | Use Search government files or Search user files instead when file metadata is enough. |
Supported staged item types currently include file records and selected file-bearing entities such as government_file, user_file, pursuit, federal_contract_opportunity, federal_contract_idv, and federal_grant_opportunity.
Add files to a vector store
Call Add_To_Vector_Store with the resolved items. Omit govtribe_vector_store_id to create a new vector store, or include an existing ID to append files to a reusable store.
Tool: Add_To_Vector_Store
{
"items": [
{
"govtribe_type": "government_file",
"govtribe_id": "<GOVERNMENT_FILE_ID>"
}
]
}Capture the returned govtribe_vector_store_id. Later steps use that ID for readiness checks and retrieval.
Poll readiness
Inspect the status returned by Add_To_Vector_Store.
| Status | Next step |
|---|---|
in_progress | Call Add_To_Vector_Store again later with the same arguments. |
completed | Search the vector store with Search_Vector_Store. |
failed | Do not assume the requested files are ready for retrieval. Review the failed file names and adjust the source set. |
Do not search the vector store until the add response reports that the hosted tool is ready.
Search staged file content
Call Search_Vector_Store after the vector store is ready. Keep max_num_results as small as the question allows.
Focused retrieval:
Tool: Search_Vector_Store
{
"query": "List mandatory deliverables and submission format instructions.",
"govtribe_vector_store_id": "<VECTOR_STORE_ID>",
"max_num_results": 5,
"rewrite_query": false
}Conceptual retrieval:
Tool: Search_Vector_Store
{
"query": "Summarize cybersecurity incident response expectations and reporting deadlines.",
"govtribe_vector_store_id": "<VECTOR_STORE_ID>",
"max_num_results": 10,
"rewrite_query": true
}Treat returned chunks as semantic evidence. They can support an answer, but they are not a full-document export.
Query construction
| Need | Query guidance |
|---|---|
| Specific clause, form, or instruction | Name the exact term, clause, requirement area, or document section and keep rewrite_query off. |
| Broader concept | Use a natural-language question and consider rewrite_query: true. |
| Too few useful results | Broaden the wording or enable query rewriting. |
| Too many noisy results | Narrow the wording, name the exact requirement area, or lower max_num_results. |
Examples
Find candidate government files before staging:
Tool: Search_Government_Files
{
"query": "\"proposal instructions\"",
"federal_contract_opportunity_ids": ["<FEDERAL_CONTRACT_OPPORTUNITY_ID>"],
"fields_to_return": [
"govtribe_id",
"name",
"content_snippet",
"parent_record"
],
"per_page": 5
}Stage one file and retrieve compliance instructions:
Step 1 Tool: Add_To_Vector_Store
{
"items": [
{
"govtribe_type": "government_file",
"govtribe_id": "<GOVERNMENT_FILE_ID>"
}
]
}Step 2 Tool: Search_Vector_Store
{
"query": "Extract proposal volume requirements, page limits, due date instructions, and required forms.",
"govtribe_vector_store_id": "<VECTOR_STORE_ID>",
"max_num_results": 8,
"rewrite_query": false
}Stage all files attached to an opportunity when the user asks about the full package:
Tool: Add_To_Vector_Store
{
"items": [
{
"govtribe_type": "federal_contract_opportunity",
"govtribe_id": "<FEDERAL_CONTRACT_OPPORTUNITY_ID>"
}
]
}Retrieve evidence for a source-grounded answer:
Tool: Search_Vector_Store
{
"query": "What past performance requirements, key personnel requirements, and technical evaluation factors appear in the solicitation package?",
"govtribe_vector_store_id": "<VECTOR_STORE_ID>",
"max_num_results": 10,
"rewrite_query": true
}When not to use it
Do not stage files just because vector retrieval is available. Prefer the normal MCP search path when:
- the question is about record metadata, not file text
content_snippetalready answers the question- the user needs a list of files, not semantic chunks from file contents
- the selected
govtribe_typeis not supported byAdd_To_Vector_Store
Related articles
- Add to vector store MCP tool: Review supported item types and staging arguments.
- Search vector store MCP tool: Review semantic retrieval arguments.
- Search vector store MCP response: Interpret returned text reports, snippets, and readiness messages.
- Search government files: Search government-file metadata and snippets before staging full text.
- Search user files: Search team-uploaded file metadata and snippets before staging full text.
Aggregations and leaderboards
Use aggregations in GovTribe Search_* MCP tools for counts, rankings, rollups, percentages, and leaderboard-style summaries.
Interactive MCP apps
Choose when to render GovTribe interactive MCP apps, which Show_* tool to use, and when to read canonical state with Interaction_State.