Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
X-SLF-Api-KeyNoYour SuanLinFang API key (nk- prefix) for the remote Streamable HTTP server, passed as the X-SLF-Api-Key header.
SUANLINFANG_API_KEYNoYour SuanLinFang API key (nk- prefix) for stdio/local use. Required for stdio.
SUANLINFANG_BASE_URLNoAPI base URL override.https://suanlinfang.cn/v1
SUANLINFANG_MCP_PORTNoListen port for the HTTP entry.8090

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

算邻坊 AI 能力(suanlinfang.cn,按量计费,失败不计费)。生图为引流主推能力:generate_image 一次调用出图(文生图/图生图合一,默认自动选模型)。另有语音识别(STT)、语音合成(TTS)、文字识别(OCR)三族能力。所有工具调用需 API Key(nk- 前缀,suanlinfang.cn/consume-web/api-keys.html 创建,新用户赠 ¥10 体验金)。

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": true
}
resources
{
  "subscribe": false,
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
generate_imageA

AI 生图(1024×1024 PNG,按张计费,失败不计费):传 prompt 即文生图;再传 init_image_url(参考图公网 URL,png/jpg/jpeg ≤10MB)即图生图(换装/换景/改背景等编辑指令写在 prompt 里)。 本工具一次调用内完成「提交→等待→出结果」,默认最多等 120 秒(wait_seconds 可调 10~300); 出图成功返回 resultUrl(现签下载链接,1 小时内有效,请提醒用户及时下载转存)。 model 留空自动选:文生图=flux2-klein(快而省),图生图=qwen-image-edit-2511;要更高质量可传 z-image-turbo,在线模型与实时牌价先用 list_image_models 查询。 seed(非负整数)可复现同图:同 prompt + 同 seed 生成一致结果。 若等待超时仍未完成,返回 taskNo(任务不丢失、不计排队费),调用 get_image_task 继续查询。

get_image_taskA

查询生图任务状态。status:queued/running(进行中,快档常在数十秒内出图,慢档可能数分钟——视模型档位与当前空闲算力)、 success(resultUrl 为图片现签下载链接,1 小时内有效;链接过期后重新查询即换新链)、 failed(errorMsg 为失败原因,不扣费)、expired(结果已过保留期)。 建议每 5~10 秒查询一次。generate_image 等待超时降级后用本工具续查。

list_image_modelsA

查询生图当前在线模型与实时牌价(id + pricing,按张计费)。选 model 前先看这个。

transcribe_audioA

把一段短音频(公网 URL)转成文字。适用于 ≤3 分钟、≤20MB 的录音/语音消息,同步秒级返回。 更长的音频请改用 submit_transcription_task(异步任务)。 language 留空自动检测(支持普通话、英语及 22 种中文方言);指定时用语种代码(如 zh、en)。 hotwords 可传热词(人名、术语、品牌,逗号分隔),专有名词按所列写法优先转写——会议转写建议填与会人名。 返回全文纯文本(不含时间戳/分句时间轴)。计费按音频实际时长(约 0.5 元/小时,精确到秒),失败不计费。

submit_transcription_taskA

提交长音频转写任务(会议录音/播客/网课,最长 2 小时、≤500MB,wav/mp3/flac/m4a/ogg/aac)。 平台自动按 180 秒切段逐段转写并拼接全文(纯文本,不含时间戳)。提交后用 get_transcription_task 轮询结果。 language 留空自动检测,指定时用语种代码(如 zh、en);hotwords 可传热词(人名、术语、品牌,逗号分隔),对全部音频段生效。 计费按实际时长(约 0.5 元/小时),余额不足会在提交时被拒绝。

get_transcription_taskA

查询长音频转写任务状态。status:queued/running(进行中,看 doneUnits/totalUnits 进度)、 success(text 为全文转写)、failed(errorMsg 为失败原因)。任务终态保留 72 小时。

synthesize_speechA

把文本合成为语音(≤1000 字符),同步返回现签下载链接(url,GET 即得音频,1 小时内有效)。 请提醒用户及时下载转存——链接过期后只能重新合成(重复计费)。 更长的文本请改用 submit_speech_task(异步任务)。speaker 音色代码先用 list_tts_voices 查询。 计费约 2 元/万字符,失败不计费。

submit_speech_taskA

提交长文本语音合成任务(≤20 万字):平台按 500 字切块合成并拼接为完整音频。 提交后用 get_speech_task 轮询结果。计费约 2 元/万字符。

get_speech_taskA

查询长文本语音合成任务状态。status:queued/running(看 doneUnits/totalUnits)、 success(resultUrl 为完整音频下载链接,1 小时内有效,过期重查即换新链)、failed(errorMsg)。 任务终态保留 72 小时。

list_tts_voicesA

查询语音合成当前可用音色清单(code/name/gender/styleTag)。合成前先看这个选 speaker。

submit_document_taskA

提交 PDF 文档识别任务(≤200MB、≤500 页,逐页识别整本)。适合扫描合同/书籍/报告。 提交后用 get_document_task 轮询结果。prompt 仅精准档生效。计费按页。

get_document_taskB

查询 PDF 文档识别任务状态。status:queued/running(看 doneUnits/totalUnits 进度)、 success(resultUrl 为聚合结果下载链接)、failed(errorMsg)。任务终态保留 72 小时。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4/5.0

Scored across 12 tools

Disambiguation4/5

Each tool maps to a distinct resource+action, and the four domains (image, transcription, TTS, document OCR) are cleanly separated. The main overlap risk is the sync/async pairs (transcribe_audio vs submit_transcription_task, synthesize_speech vs submit_speech_task), but the descriptions sharply bound them by size limits (≤3 min/20MB vs ≤2 h/500MB; ≤1000 chars vs ≤200k), so an agent can choose correctly. generate_image's built-in wait plus get_image_task as a timeout fallback is documented but is the one place where a newcomer might double-poll.

Naming Consistency4/5

All names are snake_case verb_noun with a coherent scheme: sync operations use a bare verb (generate_image, transcribe_audio, synthesize_speech), async ones use submit_*_task plus a matching get_*_task, and lookups use list_*. Minor deviations: generate_image has no submit_image_task counterpart yet still has get_image_task, and the two list tools name the resource differently (list_image_models vs list_tts_voices).

Tool Count5/5

Twelve tools for four sub-services is well-proportioned: roughly three per domain (submit/sync, poll, and a catalog lookup). No tool is redundant, and the async-poll trio repeats only because the underlying platform genuinely requires it.

Completeness4/5

Each domain has a workable lifecycle: submit/sync, poll for status, and model-or-voice discovery for image and TTS. Gaps are real but survivable — document OCR has no equivalent catalog lookup or sync path despite the prompt mentioning quality tiers, and there is no task-cancel tool. Most notably, billing is emphasized everywhere ('余额不足会在提交时被拒绝', per-page/per-character pricing) yet no balance or quota query tool exists, forcing agents to discover insufficient funds by failure.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues