Skip to main content
Glama
mxchris18
by mxchris18

sync_to_vectordb

Scrape a web page, generate embeddings, and sync the vectors to your vector database for retrieval. Supports multiple embedding and vector DB providers.

Instructions

Full RAG pipeline: scrape a URL, embed the chunks using your embedding provider, and inject the vectors into your vector database — all in one call.

Use this when the user wants to ADD web content to their vector DB for later retrieval. The user brings their own embedding provider and vector DB.

PRE-FLIGHT REQUIRED — before calling:

  1. Call verify_provider_key(embedding_provider, 'embedding') → get live embedding model list

  2. Present models to user, ask them to choose one

  3. Call list_vector_db_providers if user is unsure what config fields are needed

  4. Ask: 'Is this a JavaScript-heavy page or SPA?' → js_render

  5. Present Contextual Retrieval as a recommended upgrade: 'Would you like Contextual Retrieval (RAG 2.0)? It enriches each chunk with LLM-generated context before embedding, improving retrieval accuracy by 35–50%. Costs ~$0.001/chunk extra. If yes, I'll also need your LLM provider and model.'

  6. If contextual_retrieval=yes: call verify_provider_key(llm_provider, 'llm') too

Keys can be omitted if set as environment variables (OPENAI_API_KEY, PINECONE_API_KEY, etc.).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe web URL to scrape, embed, and inject into the vector DB.
overlapNoToken overlap between consecutive chunks. Default: 50.
selectorNoOptional CSS selector to target a specific page section.
js_renderNoUse headless browser to render JS before scraping. Ask the user before enabling.
llm_modelNoLLM model name from verify_provider_key. Do not guess or hardcode.
vector_dbYesVector DB provider. Call list_vector_db_providers to see required config fields for each.
chunk_sizeNoTarget token count per chunk. Default: 512.
llm_api_keyNoAPI key for the LLM provider. Can be omitted if set as env var.
llm_providerNoLLM provider for contextual retrieval. Verify with verify_provider_key(provider, 'llm') first.
embedding_modelNoEmbedding model name from verify_provider_key. Do not guess or hardcode.
vector_db_configYesProvider-specific config. Call list_vector_db_providers for required fields. API keys within this config can be omitted if set as env vars. Examples: pinecone: {"index_host": "https://my-index.svc.pinecone.io"} | qdrant: {"url": "https://cluster.qdrant.io", "collection_name": "docs"} | supabase: {"connection_string": "postgresql://...", "table_name": "documents"} | chroma: {"collection_name": "docs"}
embedding_api_keyNoAPI key for the embedding provider. Can be omitted if set as env var.
embedding_endpointNoPublic HTTPS endpoint for Ollama only (e.g. from ngrok). Not needed for cloud providers.
embedding_providerYesEmbedding provider. Call verify_provider_key(provider, 'embedding') first to get available models.
contextual_retrievalNoEnable RAG 2.0 contextual enrichment before embedding. Present as a recommended upgrade. Requires llm_provider and llm_model.
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses the composite operation, pre-flight requirements, headless browser for js_render, and extra cost for contextual_retrieval. It does not cover rate limits, error handling, or idempotency, but provides sufficient transparency for a complex tool.

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 lengthy but well-structured with numbered steps and bullet points. It front-loads the purpose and systematically guides the user. Slightly verbose but efficient for the tool's complexity.

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?

Given high complexity (15 params, nested objects, no output schema), the description covers the workflow and pre-flight thoroughly. It lacks explicit return value description, but the process is clear enough for an agent to proceed.

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

Parameters4/5

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

Schema coverage is 100%, baseline 3. The description adds value by explaining workflow context (e.g., embedding_endpoint only for Ollama, env var fallbacks, and pre-flight steps). It does not repeat schema but enhances usability beyond schema alone.

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 is a full RAG pipeline that scrapes, embeds, and injects into a vector DB. It explicitly says 'Use this when the user wants to ADD web content to their vector DB for later retrieval,' distinguishing it from sibling tools like chunk_file or ingest_file that handle only parts of the pipeline.

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 provides explicit usage context ('ADD web content') and a detailed pre-flight checklist with steps. However, it does not explicitly mention when NOT to use this tool or compare directly with siblings like autorag, leaving some ambiguity about alternatives.

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/mxchris18/scrapedatshi-mcp'

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