Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/tternquist/marklogic-mcp/marklogic-ragnpx skills add tternquist/marklogic-mcp --skill marklogic-raggit clone --depth 1 https://github.com/tternquist/marklogic-mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/tternquist/marklogic-mcp/marklogic-rag)<a href="https://agentmods.dev/skills/tternquist/marklogic-mcp/marklogic-rag"><img src="https://agentmods.dev/badge/skills/tternquist/marklogic-mcp/marklogic-rag.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00151 | $0.02116 |
| Opus 5 | $0.00076 | $0.01058 |
| Sonnet 5 | $0.00030 | $0.00423 |
| Haiku 4.5 | $0.00015 | $0.00212 |
Grade A, and why
marklogic-rag scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 161 lines — stays where its author put it; the contents beside it link to each section on GitHub.
RAG on MarkLogic 12
Requires MarkLogic 12+. Check for an existing vector view first with ml_views_list
and ml_schema_get_tde.
Pick a paradigm
| Situation | Approach |
|---|---|
| No embeddings, fast prototype | Lexical RAG |
| Embeddings available, simple queries | Pure vector (cosine) |
| Mixed vocabulary + semantic queries | ANN hybrid (ANN + BM25) |
| Taxonomy / knowledge graph available | Graph + Lexical |
| Highest precision, full infrastructure | Graph + Vector |
The graph layer composes with any paradigm — it only supplies a URI scope filter, so apply it before the search or ANN step.
1. Storing embeddings
Store the embedding as a JSON array of floats in an embedding field, sibling to the
content fields. Carry embeddingModel, embeddingDim, and — when chunking —
chunkIndex, chunkText, sourceUri.
Chunking strategy by domain: legal contracts → by clause; news articles → whole-document or paragraph; product manuals → by section.
⚠ Generate embeddings in your application tier, not in MarkLogic.
xdmp.httpPost to external HTTPS embedding APIs commonly fails with
tlsv1 unrecognized name (an SSL SNI limitation in MarkLogic's Java SSL client).
Produce the float array outside, then store it with flux_import or ml_document_put.
2. The TDE vector column
{
"template": {
"context": "/",
"collections": ["my-collection"],
"rows": [{
"schemaName": "my_schema",
"viewName": "my_view",
"columns": [
{ "name": "uri", "scalarType": "string", "val": "xdmp:node-uri(.)" },
{ "name": "content", "scalarType": "string", "val": "chunkText" },
{ "name": "embedding", "scalarType": "vector", "val": "array-node('embedding')",
"dimension": "1536", "invalidValues": "reject" }
]
}]
}
}
Four rules that each cause a distinct failure:
"scalarType": "vector"— not"vec:vector", not"scalar". Either of those givesTDE-INVALIDTEMPLATENODEVAL."val": "array-node('embedding')"— plain"val": "embedding"atomises the array into N individual number nodes and throwsXDMP-CAST."dimension"is required and must match the model output exactly, or queries fail withXDMP-DIMMISMATCH."invalidValues": "reject"— skips malformed documents instead of failing the whole view.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 161 lines · 151 tokens per session scan A e861253f0d8a
marklogic-rag is a skill published in the GitHub repository tternquist/marklogic-mcp (3 stars, last pushed 13d ago), licensed MIT. It adds 151 tokens to every session and 2,116 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
cli-anything-chromadb
Command-line interface for ChromaDB - A stateless CLI for managing vector database collections, documents, and semantic search. Designed for AI agents and automation via the ChromaDB HTTP API v2.
mysql reporter
生成 MySQL 查询报表并生成可视化图表。当用户需要查询 MySQL 数据库并以报表形式展示结果时使用此技能,包括:统计销售数据、分析用户行为、生成业务报表、查询业务指标等。.
qdrant-clients-sdk
Qdrant provides client SDKs for various programming languages, allowing easy integration with Qdrant deployments.
usage
Wren Engine CLI workflow guide for AI agents. Answer data questions end-to-end using the wren CLI: gather schema context, recall past queries, write SQL through the MDL semantic layer, execute, and learn from confirmed results. Use when: user asks a data question, requests a report or analysis, asks about metrics…
dlt-connector
Connect SaaS data (HubSpot, Stripe, Salesforce, GitHub, Slack, etc.) to Wren Engine for SQL analysis. Guides the user through the full flow: install dlt, pick a SaaS source, set up credentials, run the data pipeline into DuckDB, then auto-generate a Wren semantic project from the loaded data. Use this skill whenever…
generate-mdl
Generate a Wren MDL project by exploring a database with available tools (SQLAlchemy, database drivers, MCP connectors, or raw SQL). Guides agents through schema discovery, type normalization, and MDL YAML generation using the wren CLI. Use when: user wants to create or set up a new MDL, onboard a new data source, or…