Agent Skills / maison-knowledge

Install this skill alone, or read it below. Raw file: SKILL.md · references/tools.md

bash
npx skills add https://docs.maison-labs.com --skill maison-knowledge

Maison — Knowledge base

Manage what a hotel's concierge knows: website and document knowledge sources (add, sync, rescrape, disable/reactivate, follow a run and its log and report, rediscover booking links, versions, download, large uploads), curated Q&A pairs (add, update, publish, unpublish, delete, version history), unanswered-question gaps (list, detect, answer, dismiss, reopen) and knowledge quality runs (deduplicate, consistency check, their reports). Use when a hotel's answers are missing, wrong or stale, or when adding new content.

Part of the Maison public API. Read the maison-public-api skill first for authentication, discovery and transport details (https://docs.maison-labs.com/skills/maison-public-api/SKILL.md).

When to use

  • Add a page or site to a hotel's knowledge — add_website_source.
  • Upload a PDF/brochure/policy — add_document_source (≤ 64 KiB inline as bytesBase64).
  • Upload a document over 64 KiB — create_document_upload, PUT the file to its url with its headers, then add_document_source (or add_document_version) with the uploadId.
  • Take a source out of the agent's knowledge without losing it — disable_source; undo with reactivate_source.
  • Follow a scrape, sync or ingestion — list_source_runs (the source's id from list_knowledge_sources), then get_source_run_logs with after: lastSeq until finished; get_website_scrape for the step-by-step view of a website run.
  • Read what a finished website scrape or sync changed — get_source_run_report (the run's sessionId): the report inline, or format: "pdf" for a download link to the PDF the report email attaches.
  • A hotel changed booking engine — discover_booking_links (no full rescrape).
  • Fix a specific wrong answer — list_qa_pairs with search, then update_qa_pair.
  • Find what guests asked that the concierge could not answer — list_knowledge_gaps, then answer_knowledge_gap.
  • Find conflicting or duplicate answers — check_knowledge_consistency or deduplicate_knowledge (each returns a sessionId), then get_knowledge_quality_run until finished for the report; list_knowledge_quality_runs for past runs.

Before you start

  1. Send x-api-key: <key> on every call; the key only reaches /api/v1.
  2. GET /api/v1/tools (or MCP tools/list) returns the tools THIS key may run — if a tool below is missing there, you lack a grant; do not retry it.
  3. Client-scoped tools take clientId (a hotel id). whoami lists the ids you can act on.

Tools

ToolWhat it doesRESTNeeds
add_document_sourceAdd a document (PDF, DOCX, etc.) as a knowledge source and queue its ingestion.POST /api/v1/client/{clientId}/source/documentdocument-source WRITE (client); plan: document-source
add_document_versionUpload a new version of an existing document source and queue its ingestion.POST /api/v1/client/{clientId}/source/document/{documentId}/versiondocument-source WRITE (client); plan: document-source
add_qa_pairsCreate one or more Q&A pairs.POST /api/v1/client/{clientId}/qapairsqa-editor WRITE (client)
add_website_sourceAdd a website as a knowledge source for a hotel and queue its first scrape.POST /api/v1/client/{clientId}/source/websitedocument-source WRITE (client); plan: document-source; composite of set_source_sync_schedule
answer_knowledge_gapAnswer an open knowledge gap and mark it ANSWERED.POST /api/v1/client/{clientId}/knowledgegap/{gapId}/answerqa-editor WRITE (client); plan: unanswered-questions
check_knowledge_consistencyStart a consistency-check run: a pipeline task that checks Q&A pairs for answers that conflict or are ambiguous.POST /api/v1/client/{clientId}/qapairs/consistencycheckconsistency-check EXECUTE (client); plan: consistency-check
create_document_uploadGet a presigned URL to upload a document larger than the 64 KiB inline limit (up to 50 MiB).POST /api/v1/client/{clientId}/source/document/uploaddocument-source WRITE (client); plan: document-source
deduplicate_knowledgeStart a deduplication run: a pipeline task that finds and merges near-duplicate Q&A pairs in the knowledge base, optionally with a similarityThreshold (0–1) and batchSize.POST /api/v1/client/{clientId}/qapairs/deduplicatededuplication EXECUTE (client); plan: deduplication
delete_document_versionSoft-delete a non-current version of a document.DELETE /api/v1/client/{clientId}/source/document/{documentId}/version/{version}document-source WRITE (client); plan: document-source; destructive
delete_qa_pairsSoft-delete one or more Q&A pairs by id.POST /api/v1/client/{clientId}/qapairs/deleteqa-editor WRITE (client); destructive
detect_knowledge_gapsStart a manual knowledge-gap detection run for a hotel and return at once (202 { queued: true }); the run analyses recent guest chats in the background and inserts or updates gap records.POST /api/v1/client/{clientId}/knowledgegaps/detectclients EXECUTE (client); plan: unanswered-questions
disable_sourceDisable a website (kind: website) or document (kind: document) source: it stays linked with its history, its answers are frozen (the agent stops using them; they cannot be edited, published or deleted) and it is left out of syncs.POST /api/v1/client/{clientId}/source/{kind}/{sourceId}/disabledocument-source WRITE (client); plan: document-source; destructive
discover_booking_linksRe-run booking-link discovery for one website source without a full re-scrape — after the hotel changed booking engine, say.POST /api/v1/client/{clientId}/source/website/{websiteId}/bookinglinksdocument-source EXECUTE (client); plan: document-source
dismiss_knowledge_gapMark an open knowledge gap as DISMISSED without creating a Q&A pair; 404 unknown, 409 already resolved.POST /api/v1/client/{clientId}/knowledgegap/{gapId}/dismissqa-editor WRITE (client); plan: unanswered-questions
download_documentDownload a document source.GET /api/v1/client/{clientId}/source/document/{documentId}/downloaddocument-source READ (client); plan: document-source; read-only
get_knowledge_quality_runOne deduplication or consistency-check run (a sessionId from deduplicate_knowledge, check_knowledge_consistency or list_knowledge_quality_runs) with its full report: for a consistency check each conflict and ambiguity (the questions involved, why, and the Q&A pair ids when known); for a deduplication the answer counts at each stage.GET /api/v1/client/{clientId}/knowledge/quality/run/{sessionId}test-session READ (client); plan: test-session; read-only
get_qa_countsActive, deleted and total Q&A pair counts for a hotel's knowledge base.GET /api/v1/client/{clientId}/qapairs/countsqa-editor READ (client); read-only
get_qa_pairFetch a single Q&A pair by id.GET /api/v1/client/{clientId}/qapair/{qaId}clients READ (client); read-only
get_source_run_logsThe log lines of one knowledge-source run (a sessionId from list_source_runs), oldest first, after line after (its seq; omit for the start).GET /api/v1/client/{clientId}/source/run/{sessionId}/logsdocument-source READ (client); plan: document-source; read-only
get_source_run_reportThe report of one website scrape or sync run (a sessionId from list_source_runs): with format: "json" (default) the stored report (summary, added, updated, deleted, merged, conflicts, unreadable, failedUpdates, needsRescrape), generatedAt and pdfUrl, a download link for the PDF version valid for 15 minutes (null when no PDF was stored); with format: "pdf" only the download url and its expiresAt.GET /api/v1/client/{clientId}/source/run/{sessionId}/reportdocument-source READ (client); plan: document-source; read-only
get_website_scrapeThe latest scrape or sync of a linked website source, told step by step: status, the running step, countable progress, a bounded message log and stalled/stopped state; scrape: null when it never ran.GET /api/v1/client/{clientId}/source/website/{websiteId}/scrapedocument-source READ (client); plan: document-source; read-only
list_document_versionsList all versions of a document source, newest first.GET /api/v1/client/{clientId}/source/document/{documentId}/versionsdocument-source READ (client); plan: document-source; read-only
list_knowledge_gapsList unanswered questions detected in guest chat sessions, ordered by occurrence count.GET /api/v1/client/{clientId}/knowledgegapsclients READ (client); plan: unanswered-questions; read-only
list_knowledge_quality_runsThe hotel's deduplication and consistency-check runs, newest first: each with its kind, status, steps, countable progress, who started it, its headline and, once reported, the report's summary and counts (conflicts and ambiguities, or answers before, after and removed).GET /api/v1/client/{clientId}/knowledge/quality/runstest-session READ (client); plan: test-session; read-only
list_knowledge_sourcesList every website and document knowledge source attached to a hotel, including scrape/sync status, schedule and current version.GET /api/v1/client/{clientId}/sourcesdocument-source READ (client); plan: document-source; read-only
list_qa_pairsPage through the Q&A knowledge base for a hotel with optional text search, source and origin filters, a creation-time window, publish-state filter, exact ids and sort.GET /api/v1/client/{clientId}/qapairsclients READ (client); read-only
list_qa_versionsPage through the version history of a Q&A pair (DynamoDB-backed audit log), newest first.GET /api/v1/client/{clientId}/qapair/{qaId}/versionsclients READ (client), qa-editor READ (client); read-only
list_source_runsThe runs of one knowledge source, newest first: website scrapes and syncs or document ingestions, each with its steps, countable progress, who started it and its headline.GET /api/v1/client/{clientId}/source/{sourceId}/runsdocument-source READ (client); plan: document-source; read-only
publish_qa_pairsPublish one or more Q&A pairs so the chat agent uses them.POST /api/v1/client/{clientId}/qapairs/publishqa-editor WRITE (client)
reactivate_sourceReactivate a disabled website or document source: its answers come back exactly as they were before disable_source, and syncs and rescrapes are allowed again.POST /api/v1/client/{clientId}/source/{kind}/{sourceId}/reactivatedocument-source WRITE (client); plan: document-source
remove_sourcePermanently remove a website (kind: website) or document (kind: document) source from a hotel.DELETE /api/v1/client/{clientId}/source/{kind}/{sourceId}document-source WRITE (client); plan: document-source; destructive
rename_document_sourceChange the display name of a document source without changing its content or version.PATCH /api/v1/client/{clientId}/source/document/{documentId}document-source WRITE (client); plan: document-source
reopen_knowledge_gapMove an answered or dismissed knowledge gap back to OPEN, clearing its resolution (the Q&A pair that answered it is kept).POST /api/v1/client/{clientId}/knowledgegap/{gapId}/reopenqa-editor WRITE (client); plan: unanswered-questions
restore_document_versionRestore a previous version of a document source by creating a new version with the old content, then re-queueing ingestion.POST /api/v1/client/{clientId}/source/document/{documentId}/version/{version}/restoredocument-source WRITE (client); plan: document-source
restore_qa_versionRestore a Q&A pair to a previous version by copying its question and answer into a new update.POST /api/v1/client/{clientId}/qapair/{qaId}/version/{version}/restoreclients READ (client), qa-editor WRITE (client)
scrape_website_sourceQueue an immediate scrape of a specific website source.POST /api/v1/client/{clientId}/source/website/{websiteId}/scrapedocument-source EXECUTE (client); plan: document-source
set_main_website_sourceMark a website source as the main knowledge website for the hotel.PATCH /api/v1/client/{clientId}/source/website/{websiteId}/maindocument-source WRITE (client); plan: document-source
set_source_sync_scheduleChange the automatic sync schedule for a website source (NONE, DAILY, WEEKLY, BI_WEEKLY, MONTHLY).PATCH /api/v1/client/{clientId}/source/website/{websiteId}/scheduledocument-source WRITE (client), schedules WRITE (global); plan: document-source
sync_sourceQueue an on-demand sync for a website (kind: website) or document (kind: document) source.POST /api/v1/client/{clientId}/source/{kind}/{sourceId}/syncdocument-source EXECUTE (client); plan: document-source
unpublish_qa_pairsUnpublish one or more Q&A pairs so the agent no longer uses them without deleting them.POST /api/v1/client/{clientId}/qapairs/unpublishqa-editor WRITE (client)
update_qa_pairChange the question, the answer or both of an existing Q&A pair.PUT /api/v1/client/{clientId}/qapair/{qaId}qa-editor WRITE (client)

Full input fields for every tool: references/tools.md.

Recommended workflows

Add content and make it live

  1. add_website_source (domain URL) or add_document_source (name, filename, mimeType, and bytesBase64 or an uploadId from create_document_upload).
  2. Ingestion is queued; list_knowledge_sources shows scrapeStatus / lastSuccessfulIngestAt when it has landed.
  3. For hand-written facts use add_qa_pairs — new pairs are published on creation; unpublish_qa_pairs takes one out of answers without deleting it (unpublished pairs are not used).

Close knowledge gaps

  1. detect_knowledge_gaps answers 202 { queued: true } at once; poll list_knowledge_gaps (its lastSession) with status: "OPEN".
  2. For each gap: answer_knowledge_gap with an answer (optionally a reworded question) to create the Q&A pair — live at once, new pairs are stored published — or with qaId to link a pair that already answers it (nothing is created, its publish state is unchanged); dismiss_knowledge_gap when it is noise (gapIds dismisses many in one call); reopen_knowledge_gap to undo either.
  3. Run deduplicate_knowledge and check_knowledge_consistency after a large import; read each report with get_knowledge_quality_run and fix the conflicting pairs with update_qa_pair.

Tips

  • Q&A versions are kept: list_qa_versions + restore_qa_version undo a bad edit.
  • set_main_website_source marks the website that also drives the preview site; set_source_sync_schedule is Maison-staff only.

Pitfalls

  • A sync_source on a document re-ingests the stored file; a scrape_website_source fetches the live site. Do not confuse them.
  • list_qa_pairs can return 503 when semantic search is down — retry later rather than concluding the knowledge base is empty.
  • Inline base64 uploads over 64 KiB are rejected with 413 too_large — use create_document_upload.
  • download_document returns bytesBase64 up to 64 KiB, else downloadUrl + expiresAt (15 minutes).
  • update_qa_pair takes question, answer or both; the field left out keeps its stored value.
  • sync_source / scrape_website_source / discover_booking_links answer 409 for a disabled source — reactivate_source first.
  • add_website_source with a syncSchedule other than NONE needs Maison-staff schedules WRITE (403 otherwise, nothing created).

Calling conventions

Same tool, three transports — pick whichever your runtime already speaks. Always send x-api-key.

bash
# REST
curl -X POST "https://maison-labs.com/api/v1/client/<clientId>/source/document" -H "x-api-key: $MAISON_API_KEY" -H "content-type: application/json" -d '{ "name": …, "filename": …, "mimeType": … }'
json
// MCP (https://maison-labs.com/mcp, Streamable HTTP): tools/call
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "add_document_source", "arguments": { "name": …, "filename": …, "mimeType": … } } }
json
// A2A (https://maison-labs.com/a2a): tasks/send with a data part
{ "jsonrpc": "2.0", "id": 1, "method": "tasks/send", "params": { "message": { "role": "user", "parts": [{ "type": "data", "data": { "tool": "add_document_source", "input": { "name": …, "filename": …, "mimeType": … } } }] } } }

Errors are the same everywhere: 401 no/invalid key; 403 forbidden with details.missing (the grants you lack — fall back to the composite's parts or stop); 403 not_entitled (the hotel's plan lacks the feature); 404, 409, 413 too_large, 503. Inputs that fail validation return 400 invalid_input with the Zod issues — fix and retry once.