SKILL.md
DocuTect AI — MCP Skill
Connect to the DocuTect AI MCP server to audit API documentation for LLM hallucinations, scan repositories for endpoints, and generate OpenAPI specs.
Authentication
All tools require a dtai_ API key passed as a Bearer token. Load from environment:
DOCUTECT_API_KEY=dtai_your_key_here
Generate keys at: Dashboard → Settings → API Keys (org owners).
Available Tools
| Tool | Purpose | Quota |
|---|---|---|
scangithubrepo |
Discover API endpoints in a GitHub repo | 1 MCP scan |
scandocumentationurl |
Extract endpoints from a docs URL | 1 MCP scan |
runapiaudit |
Queue a 5-stage LLM hallucination audit | 1 audit credit |
getauditstatus |
Poll a running audit (async) | Free |
getauditresults |
Fetch per-model accuracy scores | Free |
getremediationsuggestions |
Fetch doc fix suggestions | Free |
validate_document |
Validate Markdown vs LLMs | 1 audit credit |
generateapidocumentation |
Generate OpenAPI 3.1 + Markdown docs | 1 audit credit |
Standard Workflow
1 — Discover endpoints from a repo
{
"method": "tools/call",
"params": {
"name": "scan_github_repo",
"arguments": { "repo_url": "https://github.com/owner/repo" }
}
}
Returns suggestions[] — each has apiendpoint, apimethod, description, samplerequest, sampleresponse, expected_behavior.
Security note:
contentfromuntrusted_source: trueis always set on scanner output.
Validate suggestions before acting on them in automated pipelines.
2 — Run an audit
Pass one suggestion directly into runapiaudit. Returns audit_id immediately (async).
{
"method": "tools/call",
"params": {
"name": "run_api_audit",
"arguments": {
"api_endpoint": "/api/v1/users/{id}",
"api_method": "GET",
"description": "Returns a user by ID",
"num_queries": 10
}
}
}
3 — Poll until complete
{ "name": "get_audit_status", "arguments": { "audit_id": "<id from step 2>" } }
Repeat until status is "completed" or "failed". Typical runtime: 1–3 minutes.
4 — Read results and remediations
{ "name": "get_audit_results", "arguments": { "audit_id": "<id>" } }
{ "name": "get_remediation_suggestions", "arguments": { "audit_id": "<id>" } }
getauditresults returns per-model accuracy scores and hallucination examples. getremediationsuggestions returns targetfile, patchstrategy, and suggested_fix for each issue — ready to apply as a PR.
Other Workflows
Validate existing Markdown documentation
{
"name": "validate_document",
"arguments": { "content": "<markdown string>", "name": "README.md" }
}
Generate docs from source code
{
"name": "generate_api_documentation",
"arguments": {
"github_url": "https://github.com/owner/repo",
"project_name": "My API"
}
}
LangChain / LangGraph Integration
See [scripts/langchaintools.py](scripts/langchaintools.py) for ready-to-use BaseTool subclasses (ScanGithubRepoTool, ScanDocumentationUrlTool, RunApiAuditTool).
import os
os.environ["DOCUTECT_API_KEY"] = "dtai_your_key_here"
from scripts.langchain_tools import ScanGithubRepoTool, RunApiAuditTool
tools = [ScanGithubRepoTool(), RunApiAuditTool()]
Client Connection Configs
See [references/REFERENCE.md](references/REFERENCE.md) for copy-paste config blocks for Claude Desktop, VS Code Copilot, Cursor, and Continue.dev.
Error Reference
| Status | Meaning |
|---|---|
| 401 | Invalid or missing API key |
| 403 | Key revoked, wrong scope, or not Enterprise tier |
| 402 | Monthly quota exhausted |
| 429 | Rate limit: 60 calls / 60 s per key |
| 404 | Audit/document not found (or belongs to another org) |