mcp-server
v0.1.13MCP server for using Sapling.ai language tools from Claude and other MCP-compatible assistants.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
sapling_grammar_check
Check text for grammar, spelling, punctuation, and style issues. Returns edit suggestions. Set auto_apply=true to also receive applied_text: the input with all suggested edits already applied. Set include_error_categories=false to skip error classification and get only the corrections and offsets back (faster and lighter when you only need to apply fixes). If the result carries a degraded object it is partial: some sentences may be missing some or all of their corrections (the edits returned are still valid); call again for a complete result.
| Parameter | Type | Description |
|---|---|---|
text * | string | Text to process. |
advanced_edits | boolean | Request advanced edit suggestions where supported. |
auto_apply | boolean | If true, the response includes applied_text with all edits applied to the input. |
include_error_categories | boolean | Defaults to true. If false, edits omit error_type, general_error_type and classifier-generated descriptions; corrections, offsets, IDs and applied_text are unchanged. |
lang | string | Optional language code, such as en, es, fr, de, or auto. |
medical | boolean | Enable medical spellcheck where supported. |
session_id | string | Optional caller-provided session id. |
variety | string | English variety to enforce, e.g. "us-variety" or "gb-variety". Optional. |
sapling_spell_check
Check text for spelling issues. Returns spelling-focused edit suggestions. A result carrying a degraded object is partial; call again for a complete result.
| Parameter | Type | Description |
|---|---|---|
text * | string | Text to process. |
lang | string | Optional language code, such as en, es, fr, de, or auto. |
session_id | string | Optional caller-provided session id. |
sapling_ai_detect
Score how likely a text is to be AI-generated. Returns an overall score between 0 (likely human-written) and 1 (likely AI-generated), ai_fraction (the share of the text in sentences scoring >= 0.5, which flags partially AI-written documents), a verdict (human, mixed or ai), segments (character offsets of the AI-scored passages), low_confidence with low_confidence_reasons (short_text, list_format: inputs where false positives are more likely, so hedge the result), plus per-sentence scores by default. Provide at least ~50 characters of text for a meaningful score; 500+ characters of prose is mos…
| Parameter | Type | Description |
|---|---|---|
text * | string | Text to process. |
lang | string | Language of the text: en, ar, de, es, fr, it, ja, ko, nl, pl, pt, ro, ru, sv, tr or zh. Omit (or "auto") to detect it; other languages are rejected. |
min_words | integer | Abstain on out-of-scope input (off by default). When set, text with fewer words than this (Chinese/Japanese: ~2 characters per word) or mostly bullet/numbered lines gets verdict "insufficient_text" in… |
score_string | boolean | Return compact token score string where supported. |
sent_scores | boolean | Include per-sentence scores (default true). |
zero_retention | boolean | Keep no copy of the text: the result is not cached (so no certificate hash), and usage is logged without the text. Default false; always on for teams with data retention disabled. |
sapling_ai_detect_url
Fetch a public web page (or a linked .pdf, .docx, .pptx, .odt, .txt or .md document) and score how likely its main text is to be AI-generated. Use this instead of sapling_ai_detect when you have a link rather than the text: Sapling fetches the page itself, drops navigation, headers, footers, forms and hidden elements, and scores only the main readable text (the largest <article>, else <main>). Returns the same fields as sapling_ai_detect (score from 0 = likely human to 1 = likely AI, ai_fraction, verdict, segments, low_confidence, per-sentence scores by default, and the scored text) plus sourc…
| Parameter | Type | Description |
|---|---|---|
url * | string | The http(s) URL of the page or document to check. A bare host/path gets https://. |
lang | string | Language of the page: en, ar, de, es, fr, it, ja, ko, nl, pl, pt, ro, ru, sv, tr or zh. Omit (or "auto") to detect it; other languages are rejected. |
score_string | boolean | Also return score_string, an HTML rendering of the scored text highlighted by score (default false). |
sent_scores | boolean | Include per-sentence scores (default true). |
version | string | Pin a detector model version. Omit for the default. |
zero_retention | boolean | Keep no copy of the text: the result is not cached (so no certificate hash), and usage is logged without the text. Default false; always on for teams with data retention disabled. |
sapling_rephrase
Generate alternative phrasings of a text. mapping selects the transformation (default "paraphrase"); num_results controls how many alternatives are returned (default 5).
| Parameter | Type | Description |
|---|---|---|
text * | string | Text to process. |
mapping | string | Transformation to apply. Defaults to "paraphrase". |
num_results | integer | Number of alternatives to return (default 5). |
tense_mapping | string | Target tense. Only used with mapping="switch_tense". |
tone_mapping | string | Target tone. Only used with mapping="switch_tone". |
sapling_summarize
Summarize a longer text, webpage or email thread (HTML input is accepted and flattened). Returns a prose `summary` plus a `key_points` list, sized by the optional `length` option.
| Parameter | Type | Description |
|---|---|---|
text * | string | Text to process. |
length | string | Target summary size: "short" (1-2 sentences), "medium" (one paragraph, the default) or "long" (a few short paragraphs). |
sapling_extract
Extract structured data from unstructured text: name the fields you want and get back typed values. Invoices, emails, resumes, support tickets, contracts, forms — anything. Returns `data` (a {field name: value} map with every field you asked for, `null` where the text did not state it), `fields` (one entry per field, in request order, each with the value's `type`, the verbatim `evidence` span it came from, and `found`) and `missing` (the names the text did not yield). Fields can be plain names or {name, type, description, required} objects — a description sharpens ambiguous fields. Use `co…
| Parameter | Type | Description |
|---|---|---|
fields * | array | The fields to pull out (1-20): field names, or {name, type, description, required} objects. Names must be unique. |
text * | string | The document to extract from, plain text or HTML (the API caps it at 10,000 characters). |
context | string | Optional guidance (the API caps it at 500 characters): what the document is and how to read ambiguous fields, e.g. "A vendor invoice". |
sapling_sentiment
Classify the sentiment of a text (positive / neutral / negative). Returns overall and per-sentence sentiment with confidence scores.
| Parameter | Type | Description |
|---|---|---|
text * | string | Text to process. |
sapling_tone
Classify the emotional tone of a text (e.g. friendly, confident, sad, angry). Returns overall and per-sentence tone labels with confidence scores.
| Parameter | Type | Description |
|---|---|---|
text * | string | Text to process. |
sapling_readability_statistics
Compute readability statistics for a text: grade-level readability scores, estimated reading time, and counts of characters, words, and sentences.
| Parameter | Type | Description |
|---|---|---|
text * | string | Text to process. |
lang | string | ISO 639-1 language code of the text. Defaults to "en". |
sapling_autocomplete
Predict how a partially written sentence continues. Send the trailing text the user has typed as query (200 characters maximum) and the tool returns the predicted continuation. Requires an API key with autocomplete enabled; other keys get an explicit error back.
| Parameter | Type | Description |
|---|---|---|
query * | string | The partial text to continue, at most 200 characters. Send the end of what the user has typed, not the whole document. |
session_id | string | Optional stable identifier for the document or conversation being written. |
sapling_language_detect
Detect the language of text. Returns the top language code with its English name and confidence, reliable (the recommended threshold: true when the confidence is high and the text has enough letters; short inputs like "OK" are never reliable) and script, the dominant writing system as an ISO 15924 code (e.g. Latn, Cyrl, Hani, Jpan), runner-up candidates, and optionally a per-segment breakdown for mixed-language text.
| Parameter | Type | Description |
|---|---|---|
text * | string | Text to process. |
segments | boolean | Also detect the language of each line/sentence and return them under `segments` (with start/end character offsets). Useful for mixed-language text. |
top_k | integer | Number of language candidates to return (1-10). Defaults to 3. |
sapling_translate
Translate text into a target language with an LLM. Returns `translation` (line breaks, markup and placeholders preserved in place), the detected source language (`source_lang` code + `source_lang_name` — detected from the text, never assumed from the hint; `und`/null when undetermined) and the normalized target (`target_lang`, `target_lang_name`). `target_lang` and `source_lang` accept an ISO 639 code ("fr", "zh-TW") or an English language name ("French"); region variants zh-CN/zh-TW/zh-HK, pt-BR/pt-PT, en-GB/en-US, fr-CA and es-419 are supported as targets. Optional `formality` picks a form…
| Parameter | Type | Description |
|---|---|---|
target_lang * | string | Language to translate into: ISO 639 code ("fr", "zh-TW") or English name ("French"). |
text * | string | The text to translate (the API caps it at 5,000 characters). Markup and line structure are preserved, not stripped. |
formality | string | Optional register: "formal" (vous/Sie/usted) or "informal" (tu/du/tú). Omit for the model default. |
source_lang | string | Optional hint for the source language (same forms as target_lang). The text itself wins if they disagree. |
sapling_classify
Classify a text into a set of labels you supply — intent, topic, category, routing queue, sentiment buckets, anything — without training data. Returns `label` (the best match, always one of your labels), `labels` (single-label: just the best match; multi-label: every label whose score >= threshold, possibly empty), `scores` (one {label, score} per input label, descending; a distribution in single-label mode, independent 0-1 applicability in multi-label mode) and a one-sentence `rationale`. Labels can be plain names or {name, description} objects — a short description per label sharpens b…
| Parameter | Type | Description |
|---|---|---|
labels * | array | The candidate labels (2-20): label names, or {name, description} objects. Names must be unique. |
text * | string | Text to classify, plain text or HTML (the API caps it at 10,000 characters). |
context | string | Optional guidance (the API caps it at 500 characters): what the texts are and how to decide borderline cases. |
multi_label | boolean | true = several labels may apply at once (labels = those scoring >= threshold). Default false = exactly one label. |
threshold | number | Multi-label cut-off on the per-label score (default 0.5). Ignored in single-label mode. |
sapling_styleguide
Check a text for compliance with style rules you supply — house style, brand voice, editorial guidelines. Only the listed rules are enforced. Returns `violations` (each with the verbatim offending passage as `text`, its `start`/`end` offsets in the submitted text — null when the passage cannot be located — the violated `rule`, a brief `note` and a compliant rewrite `suggestion`), the checked `rules` and a top-level `compliant` boolean. An empty violations list means the text complies. The text is checked as submitted (markup included), so offsets always index it directly. 1-20 rules; a {…
| Parameter | Type | Description |
|---|---|---|
text * | string | The text to check (the API caps it at 10,000 characters). Checked as submitted — markup is not stripped. |
rules | array | The style rules to enforce (1-20): rule names, or {name, description} objects. Names must be unique. Provide exactly one of rules or ruleset. |
ruleset | string | The name of a saved ruleset (created via POST /api/v1/styleguide/rulesets, the API caps it at 100 characters) to check against in place of inline rules. Matched case-insensitively within the API key's… |
sapling_simplify
Rewrite a text in plain language at a target reading level, keeping all of its content, structure and language (nothing is summarized or dropped). Returns `simplified` (the rewrite), the applied `reading_level`, the `lang` the readability scores were computed for, and a before/after `readability` block (Flesch-Kincaid grade and reading ease) when the language supports it, so the improvement is verifiable. Use `preserve_terms` for names or defined terms that must survive verbatim.
| Parameter | Type | Description |
|---|---|---|
text * | string | The text to simplify (the API caps it at 5,000 characters). Sent to the model as-is — markup and line structure are preserved, not stripped. |
lang | string | ISO 639-1 code used to pick the readability formula for the before/after scores and the billed language. Omit for auto-detection (falls back to "en"). The rewrite itself always stays in the text's own… |
preserve_terms | array | Terms the rewrite must keep exactly as written (up to 20 product names or defined legal terms; the API caps each at 100 characters). An empty list is a no-op. |
reading_level | string | Target audience: "plain" (plain-language style for a general audience, the default), "elementary" (~US grade 3-5), "middle_school" (~grade 6-8) or "high_school" (~grade 9-10). |
sapling_seo
Analyze a page or article body (plain text or HTML) for SEO and generate metadata. Always returns `stats` (chars, words, sentences, paragraphs, reading_time_min, flesch_reading_ease, flesch_kincaid_grade), `keywords` (count, density and in_first_100_words for each target keyword you pass) and `top_terms` (the most frequent content words/phrases — what the page reads as being about). By default also returns LLM-generated `suggestions`: 3 title tags, 3 meta descriptions, a URL slug (null when no ASCII slug can be derived, e.g. CJK text) and focus keywords, written in the language of the text a…
| Parameter | Type | Description |
|---|---|---|
text * | string | Page/article body, plain text or HTML (the API caps it at 20,000 characters). |
keywords | array | Target keyword phrases, most important first (the first is the primary keyword). Up to 10, each capped by the API at 100 characters. Measured in the text and steered into the suggestions. |
lang | string | ISO 639-1 language code of the text (region subtag allowed, e.g. pt-BR; or auto). Defaults to en. Only selects the readability formulas: supported for en, de, es, fr, it, nl, pl, ru; for any other cod… |
suggestions | boolean | Generate LLM suggestions (titles, meta_descriptions, slug, keywords). Defaults to true; false returns only stats, keywords and top_terms and is not billed. |
sapling_quality
Score the writing quality of text from 1 (poor) to 5 (excellent). Returns `score` (a fluency/grammaticality score from a language model). Set sentence_scores=true to also get a per-sentence breakdown (with start/end character offsets) to find the weakest sentences. Set rubric=true for an LLM-judged rubric: overall score, clarity/coherence/correctness/concision scores, a summary, and concrete issues each with the quoted excerpt, offsets, a note and a suggested rewrite. rubric=true is billed at a higher rate than the plain score.
| Parameter | Type | Description |
|---|---|---|
text * | string | Text to process. |
rubric | boolean | Also return the LLM rubric (overall + clarity/coherence/correctness/concision, summary, quoted issues with suggested rewrites) under `rubric`. Defaults to false. |
sentence_scores | boolean | Also return a 1-5 score per sentence under `sentences`. Defaults to false. |
sapling_detect_pii
Detect personally identifiable information (emails, phone numbers, US SSNs, credit card numbers, IP addresses, IBANs, US bank routing numbers) in text. Detection of those types is deterministic (pattern + checksum validation, no ML) and every entity carries exact character offsets (start/end) into the submitted text. Set redact=true to also receive redacted_text with each entity replaced by a placeholder like [EMAIL]. Person names, organizations, and locations/street addresses are NOT detected by default: list person/organization/location in types explicitly to add LLM-backed detection of them…
| Parameter | Type | Description |
|---|---|---|
text * | string | Text to process. |
redact | boolean | If true, the response includes redacted_text with every detected entity replaced by its placeholder. |
types | array | Restrict detection to these PII types. Defaults to all deterministic types; person, organization, and location run only when listed here explicitly. |
sapling_ner
Find named entities in a text — people, organizations, locations, dates, times, money amounts, percentages, quantities, products, events — with character spans. Returns entities (each with its verbatim text, type, and start/end offsets into the exact submitted text) and types (the distinct types found). Every entity is a span the text actually contains — invented mentions are dropped. Offsets index the submitted text as-is (nothing is stripped or normalized), so they can be applied directly to your copy of the document. Use types to restrict recognition to a subset. Complements sapling_d…
| Parameter | Type | Description |
|---|---|---|
text * | string | The text to analyze. Offsets index this exact string — HTML is not stripped, so pass the form you want spans into. |
types | array | Entity types to recognize. Default: all of them. |
sapling_inclusive
Find non-inclusive or biased wording in a text — gendered defaults, ableist idioms, ageist framing, outdated terms for groups, classist or appearance-based language. Returns issues, each with the verbatim passage, its start/end offsets in the submitted text (null when the passage cannot be located), a category, a severity (low / medium / high), a brief note and a neutral replacement suggestion, plus a top-level inclusive boolean. Wording is flagged, not topics: text that discusses or quotes a term to critique it is not an issue. Use categories to restrict the check to a subset. The text is c…
| Parameter | Type | Description |
|---|---|---|
text * | string | The text to check. Checked as submitted — markup is not stripped. |
categories | array | Categories to check. Default: all of them. |
sapling_safety
Score text on content-safety categories: toxicity, profanity, harassment, hate speech, self-harm, sexual content, and violence. Returns a 0-1 score per category plus flagged categories. With spans=true, also returns the offending passages as spans with offsets and per-passage scores.
| Parameter | Type | Description |
|---|---|---|
text * | string | Text to process. |
spans | boolean | When true, also return the offending passages as spans with start/end offsets and per-passage category scores. Defaults to false. |
threshold | number | Score at or above which a category is flagged. Defaults to 0.5. |
sapling_source_match
Find the passages a text copies word for word from source documents you supply: reference answers, earlier submissions, the pages a draft was researched from, an internal corpus. Returns similarity (the share of the text's words inside a copied span from any source) and, for each source that shares a span, its index and id, matched_words, matched_fraction and spans (start/end character offsets into the exact submitted text, the word count and the copied text). Matching ignores case, punctuation and curly vs straight apostrophes. Set exclude_quotes to ignore quoted passages, as plagiarism check…
| Parameter | Type | Description |
|---|---|---|
sources * | array | Documents to compare against, as objects with a text or a url, and an optional id. Combined source text is limited to 300,000 characters; at most 5 sources can be URLs, and each fetched page is cut at… |
text * | string | The text to check. Span offsets index this exact string. |
exclude_quotes | boolean | true = words inside double quotation marks (any common style) or on block-quote lines starting with > never count as matched. Default false. |
min_words | integer | Shortest shared run of words reported. Default 8. |
sapling_jd_match
Measure how closely a resume is tailored to the job description it was submitted against. Returns keyword_coverage (the share of the posting's salient keywords the resume uses), matched_keywords and missing_keywords (with counts), the passages the resume copies verbatim from the posting (copied_spans: runs of 6 or more shared words with start/end character offsets into the exact resume text, plus copied_fraction and has_copied_span), and a score from 0 to 1 with a level of low, moderate or high. The score is a transparent heuristic over those signals, not a probability, and says nothing about…
| Parameter | Type | Description |
|---|---|---|
job_description * | string | The job posting. It needs at least 5 distinct keywords; a shorter one is rejected. |
text * | string | The resume, as plain text. Span offsets index this exact string. |
sapling_ai_detect_models AI detector model catalog
List the AI detector model versions Sapling serves, so you can pick a version for sapling_ai_detect or sapling_ai_detect_url instead of guessing. Returns default (the version that scores text when no version is sent; null mid-rollout), routes (language code -> the version that scores text detected as that language) and models: each version with its family (english or multilingual), languages, release date, status (default, routed, or pinned = used only when a request sends that version) and pinnable (whether a request may send it as version). Sending no version is usually right: routing alread…