mcp-server

v0.1.13
@saplingai/mcp-server Checked 1 day ago Published 5 days ago

MCP 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.

ParameterTypeDescription
text *stringText to process.
advanced_editsbooleanRequest advanced edit suggestions where supported.
auto_applybooleanIf true, the response includes applied_text with all edits applied to the input.
include_error_categoriesbooleanDefaults to true. If false, edits omit error_type, general_error_type and classifier-generated descriptions; corrections, offsets, IDs and applied_text are unchanged.
langstringOptional language code, such as en, es, fr, de, or auto.
medicalbooleanEnable medical spellcheck where supported.
session_idstringOptional caller-provided session id.
varietystringEnglish 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.

ParameterTypeDescription
text *stringText to process.
langstringOptional language code, such as en, es, fr, de, or auto.
session_idstringOptional 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…

ParameterTypeDescription
text *stringText to process.
langstringLanguage 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_wordsintegerAbstain 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_stringbooleanReturn compact token score string where supported.
sent_scoresbooleanInclude per-sentence scores (default true).
zero_retentionbooleanKeep 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…

ParameterTypeDescription
url *stringThe http(s) URL of the page or document to check. A bare host/path gets https://.
langstringLanguage 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_stringbooleanAlso return score_string, an HTML rendering of the scored text highlighted by score (default false).
sent_scoresbooleanInclude per-sentence scores (default true).
versionstringPin a detector model version. Omit for the default.
zero_retentionbooleanKeep 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).

ParameterTypeDescription
text *stringText to process.
mappingstringTransformation to apply. Defaults to "paraphrase".
num_resultsintegerNumber of alternatives to return (default 5).
tense_mappingstringTarget tense. Only used with mapping="switch_tense".
tone_mappingstringTarget 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.

ParameterTypeDescription
text *stringText to process.
lengthstringTarget 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…

ParameterTypeDescription
fields *arrayThe fields to pull out (1-20): field names, or {name, type, description, required} objects. Names must be unique.
text *stringThe document to extract from, plain text or HTML (the API caps it at 10,000 characters).
contextstringOptional 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.

ParameterTypeDescription
text *stringText 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.

ParameterTypeDescription
text *stringText 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.

ParameterTypeDescription
text *stringText to process.
langstringISO 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.

ParameterTypeDescription
query *stringThe partial text to continue, at most 200 characters. Send the end of what the user has typed, not the whole document.
session_idstringOptional 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.

ParameterTypeDescription
text *stringText to process.
segmentsbooleanAlso detect the language of each line/sentence and return them under `segments` (with start/end character offsets). Useful for mixed-language text.
top_kintegerNumber 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…

ParameterTypeDescription
target_lang *stringLanguage to translate into: ISO 639 code ("fr", "zh-TW") or English name ("French").
text *stringThe text to translate (the API caps it at 5,000 characters). Markup and line structure are preserved, not stripped.
formalitystringOptional register: "formal" (vous/Sie/usted) or "informal" (tu/du/tú). Omit for the model default.
source_langstringOptional 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…

ParameterTypeDescription
labels *arrayThe candidate labels (2-20): label names, or {name, description} objects. Names must be unique.
text *stringText to classify, plain text or HTML (the API caps it at 10,000 characters).
contextstringOptional guidance (the API caps it at 500 characters): what the texts are and how to decide borderline cases.
multi_labelbooleantrue = several labels may apply at once (labels = those scoring >= threshold). Default false = exactly one label.
thresholdnumberMulti-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 {…

ParameterTypeDescription
text *stringThe text to check (the API caps it at 10,000 characters). Checked as submitted — markup is not stripped.
rulesarrayThe style rules to enforce (1-20): rule names, or {name, description} objects. Names must be unique. Provide exactly one of rules or ruleset.
rulesetstringThe 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.

ParameterTypeDescription
text *stringThe 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.
langstringISO 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_termsarrayTerms 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_levelstringTarget 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…

ParameterTypeDescription
text *stringPage/article body, plain text or HTML (the API caps it at 20,000 characters).
keywordsarrayTarget 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.
langstringISO 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…
suggestionsbooleanGenerate 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.

ParameterTypeDescription
text *stringText to process.
rubricbooleanAlso return the LLM rubric (overall + clarity/coherence/correctness/concision, summary, quoted issues with suggested rewrites) under `rubric`. Defaults to false.
sentence_scoresbooleanAlso 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…

ParameterTypeDescription
text *stringText to process.
redactbooleanIf true, the response includes redacted_text with every detected entity replaced by its placeholder.
typesarrayRestrict 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…

ParameterTypeDescription
text *stringThe text to analyze. Offsets index this exact string — HTML is not stripped, so pass the form you want spans into.
typesarrayEntity 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…

ParameterTypeDescription
text *stringThe text to check. Checked as submitted — markup is not stripped.
categoriesarrayCategories 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.

ParameterTypeDescription
text *stringText to process.
spansbooleanWhen true, also return the offending passages as spans with start/end offsets and per-passage category scores. Defaults to false.
thresholdnumberScore 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…

ParameterTypeDescription
sources *arrayDocuments 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 *stringThe text to check. Span offsets index this exact string.
exclude_quotesbooleantrue = words inside double quotation marks (any common style) or on block-quote lines starting with > never count as matched. Default false.
min_wordsintegerShortest 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…

ParameterTypeDescription
job_description *stringThe job posting. It needs at least 5 distinct keywords; a shorter one is rejected.
text *stringThe 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…