agentleFS
sarvamaisarvamai/skills/sarvam-mcp/SKILL.md

sarvam-mcp

Skill72 starsChanged 46 days agoApache-2.0View on GitHub

Run Indic speech and language tasks through the Sarvam MCP server: translate text, transcribe or dub audio, TTS, localize i18n files, LLM complete, document parse / extract / classify / split, or fetch Sarvam API docs/snippets while coding. Use this skill when the user wants Sarvam to act in chat, when sarvam_tools_* / sarvam_code_* are available, or when setting up sarvam-mcp in Cursor, Claude Code, Claude Desktop, Windsurf, Zed, Codex, Gemini CLI, VS Code, Cline, Continue, or LM Studio — even if they only say "translate this to Hindi" or "make it speak." Do not use for LiveKit/Pipecat agent code (voice-agents) or SDK-only coding when MCP is not installed (translate/text, translate/document, speech-to-text, text-to-speech, chat).

  • Reads credentials

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Never use sarvam_code_* for a live translate/TTS/STT request.

    line 44
  2. Very specific:

    Call again with sk_... → persists to ~/.sarvam/credentials

    line 111
  3. Distinctive:

    Read references/install.md and help the user connect the server.

    line 160
  4. Very specific:

    If they only need code: use sibling skills translate/text, translate/document, speech-to-text, text-to-speech, chat, or …

    line 161

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Sarvam MCP

Drive sarvam-mcp. Prefer MCP tools over inventing HTTP/SDK calls for live work.

Procedure

Copy and track:

- [ ] 1. MCP available? If no → read references/install.md (or fall back to SDK skills)
- [ ] 2. Namespace: live action → sarvam_tools_*; write/lookup code → sarvam_code_*
- [ ] 3. Prefer a composite if the task spans STT/translate/TTS/LLM
- [ ] 4. Call the tool (absolute paths; BCP-47 codes)
- [ ] 5. On auth error → sarvam_tools_set_api_key; on param error → fix and retry
- [ ] 6. Return the result path/text; mention observability only if debugging

1. Namespace (mandatory)

User wants…NamespaceExample
Sarvam to do it nowsarvam_tools_*"Translate this to Tamil"
Help writing code / API factssarvam_code_*"How do I call TTS from Python?"

Never use sarvam_code_* for a live translate/TTS/STT request. Never burn sarvam_tools_* credits just to draft code unless the user asked for a live demo.

2. Pick the tool (defaults)

Composites first — do not hand-chain STT → translate → TTS:

TaskTool
Spoken reply to audiosarvam_tools_voice
Dub into another Indic languagesarvam_tools_dub
Localize JSON/YAML/PO/etc.sarvam_tools_localize
Q&A / summary over audiosarvam_tools_recall

Atomic runtime (use when no composite fits):

TaskTool
Transcribesarvam_tools_stt_transcribe
Speech → Englishsarvam_tools_stt_translate
Audio >~30s / diarizationsarvam_tools_stt_batch_submit → _stt_batch_status
Speak textsarvam_tools_tts_speak
Translate textsarvam_tools_translate
Transliterate / LID / analyticssarvam_tools_transliterate / _identify_language / _text_analytics
Chat completesarvam_tools_llm_complete
Document → text / HTML / JSONsarvam_tools_vision_parse
Document fields (schema)sarvam_tools_vision_extract
Label a document or pagessarvam_tools_vision_classify
Split a multi-document PDFsarvam_tools_vision_split
Resume / check a document jobsarvam_tools_vision_job_status
Pronunciation dictssarvam_tools_pronunciation_*
Set / rotate API keysarvam_tools_set_api_key

Build-time (coding help):

TaskTool
Unsure which model/langsarvam_code_recommend_model
Endpoint shapesarvam_code_api_reference
Snippetsarvam_code_snippet
Speakers / languagessarvam_code_speakers / _languages
Validate draft bodysarvam_code_validate_request
Docs search / pricingsarvam_code_search_docs / _pricing

Coding flow: recommend_model → snippet or api_reference → validate_request.

For parameters and env knobs, read references/tools.md.

3. Defaults (use unless user overrides)

SettingDefault
STT modelsaaras:v3
TTS model / speakerSDK code: bulbul:v4-flash / persona ID (aparna_hi_customer). Live tts_speak / tts_stream / voice / dub (sarvam-mcp ≥ 0.2.11): model / tts_model = bulbul:v4-flash + persona ID; omit the speaker for the shubh_enhi_ads default. On older servers the schema enums only bulbul:v3 + short names (priya) — check the connected schema and do not send a v4 persona ID unless it lists bulbul:v4-flash.
LLMsarvam-30b (use sarvam-105b for hard reasoning)
Translate modelmayura:v1 (switch to sarvam-translate:v1 for broader Indic coverage)
Audio pathAbsolute local path
Language codesBCP-47 (hi-IN, ta-IN, od-IN not or-IN)

4. Auth

Key sources (env wins): SARVAM_API_KEY, or ~/.sarvam/credentials (api_key = sk_...).

Dashboard: https://dashboard.sarvam.ai/key-management

On auth failure:

  1. sarvam_tools_set_api_key with empty api_key → instructions + link
  2. Call again with sk_... → persists to ~/.sarvam/credentials

Wire auth is api-subscription-key — never invent Authorization: Bearer.

Examples

Live translate

User: "Translate 'Good morning' to Hindi."

→ sarvam_tools_translate with input, source_language_code=en-IN, target_language_code=hi-IN. Return translated_text.

Live TTS

User: "Say नमस्ते in Hindi."

→ sarvam_tools_tts_speak with native-script text, target_language_code=hi-IN. Prefer model=bulbul:v4-flash with a persona ID (aparna_hi_customer) when the tool schema lists it (sarvam-mcp ≥ 0.2.11); on older servers use speaker=priya on bulbul:v3. Return the audio path.

Dub

User: "Dub this clip into Tamil" + path.

→ sarvam_tools_dub with audio_path, target_language_code=ta-IN — not STT + translate + TTS separately.

Code help

User: "Show a Python TTS example."

→ sarvam_code_snippet with api=tts, language=python (not sarvam_tools_tts_speak unless they want audio now).

Gotchas

Mistake agents makeCorrect behavior
Invent curl/SDK for a live askCall sarvam_tools_* when MCP is connected
Hand-chain STT→translate→TTSUse voice / dub / localize / recall
REST STT on long filesUse stt_batch_* above ~30s
TTS target outside ~11 langsCheck with sarvam_code_languages (api=tts); STT has ~23
v2 speaker on Bulbul v3Use priya/shubh or sarvam_code_speakers
v3 short name on bulbul:v4-flash (or a v4 persona on v3)Speaker/model mismatch is rejected. v4-flash takes persona IDs only (aparna_hi_customer); v3 takes shubh / priya. Check sarvam_code_speakers with model=.
pitch / loudnesspitch −0.5–0.5, loudness 0.1–2.5, pace 0.5–2.0; out-of-range values are rejected. Accepted on both v3 and v4-flash (live-verified 2026-10-06).
Romanized Indic for TTSPrefer native script
output_script on sarvam-translate:v1mayura:v1 only
Relative audio pathsPrefer absolute paths; or audio_base64/audio_url + filename
Assume output cwdFiles go under SARVAM_MCP_BASE_PATH (default ~/Desktop) unless tool returns another path
Stale tool names without _tools/_codeMatch the connected server's tool list

When MCP is missing

  1. Read references/install.md and help the user connect the server.
  2. If they only need code: use sibling skills translate/text, translate/document, speech-to-text, text-to-speech, chat, or https://docs.sarvam.ai/llms.txt.

References (load on demand)

FileRead when
references/install.mdMCP not connected, setup/troubleshoot, or user names a client
references/tools.mdChoosing parameters, env vars, or an uncommon tool

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.