Developer Documentation · 2026-08

matrix MCP Server 开发者文档

24 个 MCP 工具完整说明:功能、输入参数、输出示例。

Created by GearShell · 部署于 matrix.k0s.io · MCP 端点 /mcp/message(全量)与 /mcp/mini/message(发布两件套)
▍图像

image_synthesize

Synthesize images from text prompts, with optional reference images for editing/transformation. Max 10 requests per call. REQUIRED format — wrap each request in a 'requests' array (do NOT pass prompt as flat parameter): {"requests": [{"prompt": "A cute cat", "output_file": "cat.png", "aspect_ratio": "1:1"}]} For image editing, pass reference images: {"requests": [{"prompt": "Make it watercolor style", "input_urls": ["https://..."], "output_file": "out.png"}]}
参数类型必填说明
requestsarray是List of image requests (max 10)
// 输出示例(content[0].text)
{"output_files":["cat.png"],"status":"ok"}

images_understand

Analyze images with prompts and return text results. Max 20 images. Supports: jpeg, png, webp. REQUIRED format — use 'image_info' array (NOT 'images', 'image_list', or 'image_urls'): {"image_info": [{"url": "https://...", "prompt": "Describe this image"}]} {"image_info": [{"file": "/absolute/path/to/img.png", "prompt": "OCR this"}]}
参数类型必填说明
image_infoarray是List of image info objects (max 20)
// 输出示例(content[0].text)
{"results":[{"description":"mock description","file":"i.png"}]}

images_search_and_download

Search and download images. At most 10 queries per request. This method is designed to be robust - individual task failures will not affect other tasks. Safety Check: - All downloaded images are automatically checked for content safety. - Images that fail safety check will be deleted and excluded from results. - DO NOT retry downloading images that failed safety check.
参数类型必填说明
queriesarray是List of image search queries. At most 10 queries per batch.
// 输出示例(content[0].text)
{"results":[{"files":["mock_image_1.png"],"query":"cat","task_name":"cat"}]}

images_list

List available images in workspace. Returns a list of image file paths.
参数类型必填说明
numberinteger否Number of images to list. Use -1 to list all images. Defaults to -1.
startinteger否Start index for pagination. 0 for the first image. Defaults to 0.
// 输出示例(content[0].text)
# Total Images: 11

## Image profile.png
File: profile.png
Path: /workspace/profile.png
File Size: 1.0 KB

## Image og.png
File: og.png
Path: /workspace/og.png
File Size: 1.0 KB

## Image banner.png
File: banner.png
Path: /workspace/banner.png
File Size: 1.0 KB

## Image thumb.png
File: thumb.png
Path: /workspace/thumb.png
File Size: 1.0 KB

## Image hero.png
File: hero.png
Path: /workspace/hero.p
…
▍视频

gen_videos

Generate video files from text prompts or images. USE THIS TOOL when user asks to "create a video", "make a clip", "generate video". Unified entry point for text-to-video (T2V) and image-to-video (I2V). Max 5 requests per call. Duration: 6 or 10 seconds. Resolution: 768P or 1080P. Output: downloadable video file (.mp4). REQUIRED format — use 'video_requests' array (NOT 'requests', 'videos', or flat parameters): Text-to-video: {"video_requests": [{"prompt": "A cat playing", "output_file": "cat.mp4"}]} Image-to-video: {"video_requests": [{"prompt": "Cat runs", "output_file": "run.mp4", "image_file": "cat.png"}]} Prefer this tool over batch_text_to_video / batch_image_to_video — it handles both T2V and I2V.
参数类型必填说明
video_requestsarray是
// 输出示例(content[0].text)
{"output_files":["cat.mp4"],"status":"ok"}

batch_text_to_video

Batch generate videos from text prompts (parallel-list format). Max 5 per call. Duration: 6 (default) or 10 seconds. Resolution: 768P (default) or 1080P. Prefer gen_videos for simpler usage — this tool uses parallel lists that must all match 'count'. REQUIRED: count, prompt_list, output_file_list (all lengths must equal count). Example: {"count": 2, "prompt_list": ["Sunset", "Ocean"], "output_file_list": ["s.mp4", "o.mp4"]}
参数类型必填说明
countinteger是Number of videos to generate (max 5)
duration_listarray否Duration for each video: 6 (default) or 10 seconds
output_file_listarray是List of output file paths (.mp4) in sandbox
prompt_listarray是List of text prompts for each video
resolution_listarray否Resolution for each video: '768P' (default) or '1080P'
// 输出示例(content[0].text)
{"count":1,"output_files":["cat.mp4"],"status":"ok"}

batch_image_to_video

Generate videos from images. Max 5 requests per call. Duration defaults to 6s, resolution to 768P.
参数类型必填说明
countinteger是Number of videos to generate (max 5)
duration_listarray否Duration for each video: 6 (default) or 10 seconds
image_file_listarray是List of image file paths in sandbox
output_file_listarray是List of output file paths (.mp4) in sandbox
prompt_listarray否List of prompts describing video content
reference_type_listarray否How to use each image: 'first_frame' (default) or 'subject'
resolution_listarray否Resolution for each video: '768P' (default) or '1080P'
// 输出示例(content[0].text)
{"count":1,"output_files":["cat.mp4"],"status":"ok"}

videos_understand

Analyze and understand video content (describe, extract info, answer questions about video). NOT for generating video — use gen_videos or batch_text_to_video for generation. Maximum 10 videos per call. REQUIRED format — use 'video_info' array (NOT 'video_list', 'videos', or 'tasks'): {"video_info": [{"file": "/absolute/path/to/video.mp4", "prompt": "Describe this video"}]} {"video_info": [{"url": "https://cdn.example.com/video.mp4", "prompt": "Analyze"}]} File paths must be absolute (e.g. /Users/...), do NOT use file:// URIs.
参数类型必填说明
video_infoarray是List of video info objects (max 10). Also accepts 'videos_info' as alias.
// 输出示例(content[0].text)
{"results":[{"file":"v.mp4","prompt":"describe"}]}
▍音频

get_voice_list

Get all available voices for text-to-speech (TTS). Returns voice_id and voice_name. Call this before using synthesize_speech, batch_synthesize_speech, or batch_text_to_audio to choose a voice.
// 输出示例(content[0].text)
{"available_voices":[{"voice_id":"male-qn-qingse","voice_name":"青涩青年音色"},{"voice_id":"female-shaonv","voice_name":"少女音色"},{"voice_id":"female-yujie","voice_name":"御姐音色"}]}

batch_text_to_audio

Convert text to spoken audio (TTS / text-to-speech). USE THIS TOOL for voiceover, narration, dialogue, podcast, or reading text aloud. For music/song generation, use batch_text_to_music instead. Each parameter list should have the same order as text_list. Optional parameters default to None. Max 10 audios per call. Output: .mp3 audio files. Example: {"count": 2, "text_list": ["Hello world", "Welcome"], "output_file_list": ["hello.mp3", "welcome.mp3"]}
参数类型必填说明
countinteger是Number of audios to generate (max 10)
emotion_listarray否Emotion: happy, sad, angry, fearful, disgusted, surprised, neutral
output_file_listarray是Output file paths (.mp3) in sandbox
pitch_listarray否Pitch for each audio [-12, 12]
speed_listarray否Speed for each audio [0.5, 2.0]
text_listarray是Text list to generate speech from
voice_listarray否Voice ID for each audio (from get_voice_list)
volume_listarray否Volume for each audio [0.0, 10.0]
// 输出示例(content[0].text)
{"count":1,"output_files":["hello.mp3"],"status":"ok"}

batch_text_to_music

Generate songs and music audio files from text prompts and lyrics. USE THIS TOOL when user asks to "create a song", "generate music", "make a beat", "compose", or any request involving music/song creation that expects an AUDIO FILE output (not just text lyrics). Lyrics are OPTIONAL — omit lyrics_list for pure instrumental/background music. Supports up to 1 minute per track, max 5 per call. Output: downloadable audio file (mp3/wav). When lyrics are provided, use newline ( ) to separate lines. Supports tags [Intro][Verse][Chorus][Bridge][Outro]. REQUIRED format — use parallel lists with matching 'count': With lyrics: {"count": 1, "prompt_list": ["Pop, sad"], "lyrics_list": ["[Verse] Rain falls..."], "output_file_list": ["song.mp3"]} Instrumental: {"count": 1, "prompt_list": ["Calm piano BGM"], "output_file_list": ["bgm.mp3"]}
参数类型必填说明
bitrate_listarray否Bitrate: 32000, 64000, 128000, or 256000
countinteger是Number of music to generate (max 5)
format_listarray否Audio format: mp3, wav, or pcm
lyrics_listarray否Song lyrics with structure tags. Char range: [10, 600]
output_file_listarray是Output file paths (mp3/wav/pcm) in sandbox
prompt_listarray是Music creation prompt (style, mood, scene). Char range: [10, 300]
sample_rate_listarray否Sample rate: 16000, 24000, 32000, or 44100
// 输出示例(content[0].text)
{"count":1,"output_files":["bgm.mp3"],"status":"ok"}

synthesize_speech

Synthesize a single spoken audio clip from text (TTS). For music/song generation, use batch_text_to_music instead. Max text 10000 chars. Use get_voice_list for system voices or clone_voice for custom voices.
参数类型必填说明
output_filestring是Output .mp3 file path in sandbox
pitchinteger否Pitch [-12, 12]. Default: 0
speednumber否Speech speed [0.5, 2.0]. Default: 1.0
textstring是Text to synthesize (max 10000 chars)
voice_idstring否Voice ID (system or cloned). Default: male-qn-qingse
volumenumber否Volume [0.0, 10.0]. Default: 1.0
// 输出示例(content[0].text)
{"message":"Speech synthesis completed","output_file":"s.mp3","url":"https://mock-cdn.example.com/audio/s.mp3","url_clean":"https://mock-cdn.example.com/audio/clean_s.mp3","url_visible":"https://mock-cdn.example.com/audio/visible_s.mp3"}

batch_synthesize_speech

Batch speech synthesis — generate multiple spoken audio clips at once (TTS). For music/song generation, use batch_text_to_music instead. Max 10 per call. Output files must be .mp3.
参数类型必填说明
countinteger是Number of audios (max 10)
output_file_listarray是Output .mp3 file paths in sandbox
pitch_listarray否Pitch for each audio [-12, 12]
speed_listarray否Speed for each audio [0.5, 2.0]
text_listarray是Text list to synthesize
voice_id_listarray否Voice ID for each audio
volume_listarray否Volume for each audio [0.0, 10.0]
// 输出示例(content[0].text)
{"count":1,"output_files":["s.mp3"],"status":"ok"}

listen_audio

Analyze one audio deeply. Audio will not be displayed to the user. Maximum 1 audio file or URL per call. Supports: mp3, wav, aiff, aac, ogg, flac, m4a.
参数类型必填说明
filestring否Audio file path in sandbox
urlstring否Audio URL (supports mp3, wav, aiff, aac, ogg, flac)
// 输出示例(content[0].text)
{"status":"ok","transcript":"mock transcript"}

audios_understand

Analyze and understand audio content (transcribe, describe, extract info from audio). NOT for generating audio — use batch_text_to_music or synthesize_speech for generation. Maximum 10 audios per call. REQUIRED format — use 'audio_info' array (NOT 'audios' or 'audio_list'): {"audio_info": [{"file": "/path/to/audio.mp3", "prompt": "Transcribe this"}]} {"audio_info": [{"url": "https://.../audio.mp3", "prompt": "Transcribe this"}]}
参数类型必填说明
audio_infoarray是List of audio info objects (max 10)
// 输出示例(content[0].text)
{"results":[{"file":"a.mp3","prompt":"transcribe"}]}
▍网络与搜索

extract_content_from_websites

Extract content from multiple websites(mime type html) concurrently. The extracted content will be returned in JSON format. DO NOT use this tool to read local files! **NEVER** use this tool to extract pdf url, use `extract_pdfs_key_info` or `extract_pdfs_full_content` instead. Safety Check: - All extracted content will be checked for safety compliance. - If content fails safety check with "safety_check_failed" error, DO NOT retry or use alternative methods. - Safety check failures are final - abandon the extraction and move on to other tasks.
参数类型必填说明
modestring否Extraction strategy. 'auto': Try HTTP GET first, fallback to browser if needed (default). 'curl_only': Direct HTTP GET only. 'browser_only': Browser rendering only.
tasksarray是List of extraction tasks. Maximum 10 tasks per call.
// 输出示例(content[0].text)
{"results":[{"content":"mock extracted content","task_name":"","url":"https://example.com/"}]}
▍部署与站点

deploy

Deploy the dist directory of Vite to web server. Note: - If no index.html is found, a warning is returned - Common development files (.git, node_modules, etc.) are automatically ignored - Returns a public URL where the deployed website can be accessed
参数类型必填说明
dist_dirstring是dist directory path (default: 'dist')
project_namestring否Project name (optional)
project_typestring否WebApps, Websites, Dashboards, Online Store, Games, Others
// 输出示例(content[0].text)
{"website_id": 431264262663335, "website_url": "https://mock.example.com/diq164w5y1ju", "screenshot_url": ""}

remote_deploy

Deploy a built website from an uploaded .tar.gz or .zip archive. Provide archive_url (server downloads it) or archive_data (base64-encoded archive). The archive should contain index.html at its root. Returns a public URL where the deployed website can be accessed.
参数类型必填说明
archive_datastring否Base64-encoded .tar.gz or .zip archive containing the built site
archive_urlstring否URL of a .tar.gz or .zip archive containing the built site (index.html at the archive root)
project_namestring否Project name (optional)
// 输出示例(content[0].text)
{"website_id": 431166892779681, "website_url": "https://mock.example.com/8bgllq7v5j2x", "screenshot_url": ""}

upload_file

Upload base64 file content to the CDN and return the public CDN URL. Use this to make files from your local machine available to external services (upload_to_cdn only accepts server-side paths). The returned URL can be passed to remote_deploy as archive_url.
参数类型必填说明
datastring是Base64-encoded file content (up to 64 MiB decoded)
filenamestring否Name the file is served under (optional, default "file")
// 输出示例(content[0].text)
{"cdn_url":"https://mock.example.com/2r6hwi8st5gg/file","status":"ok"}

upload_to_cdn

Upload a file to CDN and return the public CDN URL. **IMPORTANT: When sending files via messaging platforms (Telegram, Slack, etc.), you MUST use this tool first to get a CDN URL.** Local file paths are NOT accessible outside the agent environment. Only CDN URLs can be accessed by external services. Returns: cdn_url: Public CDN URL
参数类型必填说明
file_pathstring是Absolute path to the file to upload
// 输出示例(content[0].text)
{"cdn_url":"https://mock-cdn.example.com//tmp/i.png","status":"ok"}

deploy_html_presentation

Deploy a directory of individual HTML slide files as a unified presentation with navigation controls. This tool validates image references, combines slide HTML files into a single presentation viewer HTML, and deploys it. Requirements: - slides_dir must be an absolute path containing slide HTML files and an optional imgs/ subdirectory - All images must be under an 'imgs/' subdirectory - Image references must use bare relative paths (e.g. 'imgs/photo.png'), NOT absolute or '../' paths - HTTP/HTTPS URLs and data URIs are allowed Slide ordering: - If html_files is provided, slides are ordered as listed - If omitted, all .html files are sorted by natural order (slide2.html < slide10.html)
参数类型必填说明
html_filesarray否Optional ordered list of HTML slide filenames relative to slides_dir. If omitted, all .html files are used in natural sort order.
slides_dirstring是Absolute path to the directory containing individual HTML slide files
// 输出示例(content[0].text)
{"slides_dir":"/tmp/slides","status":"ok","url":"https://mock.example.com/slides"}

init_react_project

Initialize a React project (Vite + React + TypeScript + TailwindCSS). All dependencies are installed automatically.
参数类型必填说明
project_namestring是Project name
target_dirstring是Target directory
// 输出示例(content[0].text)
{"project_name":"p","status":"ok","target_dir":"/tmp/p"}
Created by GearShell
×