ragstack
v0.1.4Search, chat, upload, and scrape a serverless RAGStack knowledge base on AWS.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
search_knowledge_base
Search the RAGStack knowledge base for relevant documents and media. Searches across all indexed content including documents, images, and video/audio transcripts. For media files, results include timestamp information for the matching segment. Args: query: The search query (e.g., "authentication best practices", "what was discussed in the meeting") max_results: Maximum number of results to return (1-100, default: 5) Returns: Multiline string with search results: - "Found N results:" header - For each result: "[index] (score: X…
| Parameter | Type | Description |
|---|---|---|
query * | string | |
max_results | integer |
chat_with_knowledge_base
Ask a question and get an AI-generated answer with source citations. Args: query: Your question in natural language (e.g., "What are the API rate limits?") conversation_id: Optional ID to maintain conversation context across multiple queries. Pass the conversation_id from a previous response to continue the conversation. Returns: Multiline string with: - AI-generated answer text - "Sources:" section listing cited documents with titles and URLs (for video/audio sources, includes timestamps like "1:30-2:00") - "…
| Parameter | Type | Description |
|---|---|---|
query * | string | |
conversation_id |
start_scrape_job
Start a web scraping job to add website content to the knowledge base. Args: url: The starting URL to scrape (e.g., "https://docs.example.com/guide") max_pages: Maximum pages to scrape (1-1000, default: 50) max_depth: Maximum link depth to follow from start URL (0-10, default: 3). 0 = only the starting page, 1 = start page + direct links, etc. scope: How far to crawl from the starting URL: - "SUBPAGES" - Only URLs under the starting path (e.g., /docs/*) - "HOSTNAME" - All pages on the same subdomain (default)…
| Parameter | Type | Description |
|---|---|---|
url * | string | |
cookies | ||
exclude_patterns | ||
force_rescrape | boolean | |
include_patterns | ||
max_depth | integer | |
max_pages | integer | |
scope | string | |
scrape_mode | string |
get_scrape_job_status
Check the status of a scrape job. Args: job_id: The scrape job ID returned from start_scrape_job (UUID format) Returns: Multiline string with: - "Job: <job_id>" - "URL: <base_url>" - The starting URL - "Title: <page_title>" - Title of the starting page (or "N/A") - "Status: <status>" - One of: PENDING, DISCOVERING, PROCESSING, COMPLETED, FAILED, CANCELLED - "Progress: X/Y pages" - Processed count / total discovered - "Failed: N" - Number of failed pages - Returns "Job <id> not found." if job doesn't exist…
| Parameter | Type | Description |
|---|---|---|
job_id * | string |
list_scrape_jobs
List recent scrape jobs. Args: limit: Maximum number of jobs to return (1-100, default: 10) Returns: Multiline string with: - "Recent scrape jobs:" header - For each job: "[STATUS] title (X/Y pages) - job_id" - Status is one of: PENDING, DISCOVERING, PROCESSING, COMPLETED, FAILED, CANCELLED - Returns "No scrape jobs found." if no jobs exist Errors: - "Error: RAGSTACK_GRAPHQL_ENDPOINT not configured" - Missing endpoint env var - "Error: RAGSTACK_API_KEY not configured" - Missing API key env var - "Error:…
| Parameter | Type | Description |
|---|---|---|
limit | integer |
upload_document_url
Get a presigned URL to upload a document or media file to the knowledge base. Supported file types: - Documents: PDF, TXT, MD, HTML, DOC, DOCX, CSV, JSON, XML, EML, EPUB, XLSX - Images: JPG, PNG, GIF, WebP, AVIF, BMP, TIFF - Video: MP4, WebM (transcribed via AWS Transcribe) - Audio: MP3, WAV, M4A, OGG, FLAC (transcribed via AWS Transcribe) Video/audio files are automatically transcribed and segmented into 30-second chunks for semantic search. Sources include timestamps for playback. Args: filename: Name of the file to upload with extension (e.g.,…
| Parameter | Type | Description |
|---|---|---|
filename * | string |
upload_image_url
Get a presigned URL to upload an image to the knowledge base. This is step 1 of the image upload workflow: 1. Call upload_image_url() to get presigned URL and image ID 2. Upload the file to S3 using the returned URL and fields 3. Optionally call generate_image_caption() to get an AI-generated caption 4. Call submit_image() to finalize the upload with captions Supported image types: JPEG, PNG, GIF, WebP, BMP, TIFF Args: filename: Name of the image file with extension (e.g., "photo.jpg", "diagram.png"). The filename determines content type…
| Parameter | Type | Description |
|---|---|---|
filename * | string |
generate_image_caption
Generate an AI caption for an uploaded image using a vision model. This is step 3 (optional) of the image upload workflow. Call this after uploading the image file to S3 but before calling submit_image(). The vision model analyzes the image and generates a descriptive caption that will be used for semantic search in the knowledge base. Args: s3_uri: The S3 URI of the uploaded image (returned by upload_image_url). Format: "s3://bucket-name/path/to/image.jpg" Returns: Multiline string with: - "AI Caption generated!" confirmatio…
| Parameter | Type | Description |
|---|---|---|
s3_uri * | string |
submit_image
Finalize an image upload and trigger indexing to the knowledge base. This is the final step of the image upload workflow. Call this after: 1. Getting presigned URL with upload_image_url() 2. Uploading the file to S3 3. Optionally generating AI caption with generate_image_caption() The image will be indexed into the knowledge base using the provided captions for semantic search. At least one caption (caption, user_caption, or ai_caption) should be provided for meaningful search results. Args: image_id: The image ID returned by upload_image_url() (…
| Parameter | Type | Description |
|---|---|---|
image_id * | string | |
ai_caption | ||
caption | ||
user_caption |
get_configuration
Get the current RAGStack configuration settings (read-only). Returns all configuration values including chat settings, metadata extraction options, query-time filtering, public access controls, and more. This is read-only - configuration changes require admin access via the dashboard. Configuration Categories: **Chat Settings:** - chat_system_prompt: System prompt controlling AI behavior - chat_primary_model: Primary model for chat (e.g., claude-haiku-4-5) - chat_fallback_model: Fallback when quota exceeded (e.g., nova-micro) - chat_global_quota_dail…
get_metadata_stats
Get statistics about metadata keys extracted from documents in the knowledge base. This tool shows what metadata fields have been extracted from your documents, how often each key appears, sample values, and data types. Use this to understand what filters are available for searching. Metadata is extracted during document ingestion using LLM analysis. Common keys include: topic, document_type, date_range, location, author, organization. Returns: Formatted statistics for each metadata key: - Key name and data type (string, number, boolean, list)…
get_filter_examples
Get AI-generated filter examples for metadata-based search queries. Filter examples show how to construct metadata filters for common search patterns. These examples are used as few-shot learning prompts when the system generates filters from natural language queries. Each example includes: - Name: Short identifier for the filter pattern - Description: What the filter does - Use Case: When to apply this filter - Filter JSON: The actual filter syntax (S3 Vectors compatible) Filter Syntax Reference: Basic operators: $eq, $ne, $gt, $gte, $lt, $l…
get_key_library
Get the complete metadata key library with all discovered keys. The key library contains all metadata keys that have been extracted from documents across the knowledge base. This is the authoritative list of keys available for filtering and analysis. Unlike get_metadata_stats(), this returns the raw key library data optimized for programmatic use and key suggestions. Returns: Complete list of metadata keys with: - Key name (the field name used in filters) - Data type (string, number, boolean, list) - Occurrence count (document fre…
check_key_similarity
Check if a proposed metadata key is similar to existing keys in the library. Use this before adding documents with new metadata keys to avoid creating duplicate or inconsistent keys. For example, "author" vs "Author" vs "document_author" might all represent the same concept. The similarity check uses fuzzy string matching to find keys that might be duplicates or variations of the proposed key. Args: key_name: The proposed new key name to check (e.g., "author", "doc_type") threshold: Similarity threshold from 0.0 to 1.0 (default: 0.8)…
| Parameter | Type | Description |
|---|---|---|
key_name * | string | |
threshold | number |
analyze_metadata
Trigger metadata analysis to discover keys and generate filter examples. This operation samples documents from the knowledge base, analyzes their metadata fields, updates the key library statistics, and generates new filter examples for few-shot learning. IMPORTANT: This is a potentially long-running operation (1-2 minutes). It samples up to 1000 vectors from the knowledge base and uses LLM analysis to generate filter examples. What happens during analysis: 1. Samples vectors from the Bedrock Knowledge Base 2. Extracts and counts metadata field occur…