Convert content from any source into structured knowledge notes and automatically save them to WPS Notes.
Workflow
Step 1: Identify the input type and obtain the content
| Input type | How to obtain | Image interpretation path |
|---|---|---|
| URL / webpage / official account link | WebFetch(url) Extract the body text; if blocked → write in the note "Access restricted; to distill, please manually copy the original text into an AI tool for processing" |
If there are image URLs in the body text → extract them and follow the "web image" process |
| Local file (text-based PDF/Word) | Read(绝对路径); if extracted text < 50 characters → run the "image-based PDF conversion process" |
After converting to PNG, page by page Read visual interpretation |
| Local image (jpg/png/gif/webp) | Read(图片路径) → AI visual analysis (do not attempt to insert; MCP does not support local paths) |
Directly Read |
| Web image URL | insert_image(url) insert into note → read_image(note_id, block_id) get base64 → AI visual interpretation |
read_image ← WPS Notes native image recognition capability |
| Image already in the note | get_note_outline locate image block → read_image(note_id, block_id) get base64 → AI visual interpretation |
read_image ← WPS Notes native image recognition capability |
| Directly paste text / email | No need to obtain; go directly to Step 2; basis for judgment: there is no URL and no file path in the message | — |
| Multiple pieces of content | Distill all and merge; use the title "Content Distillation Collection · YYYY-MM-DD" | Process each type of image according to its corresponding path |
For the complete list of supported file formats, see references/supported-formats.md Image processing details: local image →
Readdirect visual analysis; web image →insert_imageinsert into note thenread_imageget base64 for interpretation; image embedded in a webpage → extract the URL from the body text and follow the web image process; image already in the note →get_note_outlineafter locating,read_imageinterpret; PDF/PPT image pages → see the processing flow below.
Step 2: Distill the content
Text type:
- One-sentence summary: no more than 50 characters, start with a verb, faithful to the original text
- Core viewpoints: paraphrase in your own words; do not directly copy sentences from the original text
- Key quote excerpts: must be the original sentences from the source, quoted verbatim, without alteration
- My thoughts: if the user does not provide them, leave
[待补充],do not fabricate
Image type (all sources uniformly use the following modules):
- 📌 One-sentence summary: the core content of the image, within 10 characters
- 🔍 Content interpretation: describe the image content point by point (text/interface/people/charts/graphic design, etc.); if there is text, extract it verbatim; if there is data, indicate the values
- 💡 Core information: the main viewpoint or information conveyed by the image
- 💬 My thoughts: image applicable scenarios, design highlights, or takeaways
Image interpretation cannot be skipped: the core value of a note is turning images that are "forgotten once seen" into searchable text. Even if the image is blurry or the content is abstract, you must describe everything that can be observed—otherwise the note is effectively blank.
Action checklist (optional module):
The action checklist is generated only when the content contains clear actionable suggestions; not every note needs one:
- ✅ Suitable for generation: tutorials/guides ("complete X in three steps"), methodology articles ("you should do Y"), emails containing to-dos, task-oriented documents
- ❌ Not suitable for generation: pure opinion/narrative articles, data analysis reports, story-type content, image notes
When in doubt, do not generate by default—better than forcing the generation of an empty action checklist.
For the output XML template (including color scheme), see references/output-templates.md
For the source identifier and original text appendix rules, see references/source-rules.md
Formatting specifications (enforced when writing)
| Area | Formatting method | Color |
|---|---|---|
| Source metadata | <blockquote> |
None |
| One-sentence summary | <h2>📌 一句话概括</h2> + <p> |
None |
| Core viewpoints | <h2>💡 核心观点</h2> + <columns><column columnBackgroundColor="#EBF2FF"> |
Light blue (highlightBlock Color does not take effect; use columns instead) |
| Notable quotes | <h2>⭐ 金句摘录</h2> + <columns><column columnBackgroundColor="#FFF5EB"> |
Light orange (same as above) |
| My thoughts | <h2>💬 我的思考</h2> + <p> |
None |
| Action checklist | <h2>✅ 行动清单</h2> + <p listType="todo" checked="0"> |
None |
Mandatory rules (and reasons):
- Do not add emoji to the note's main title (H1)—The WPS Notes list view directly displays H1 as the title; an emoji prefix looks cluttered in the list and hinders quick scanning
- All body headings should be uniformly H2; H3/H4 are prohibited—avoid hierarchical nesting that increases cognitive load; a note is an information summary, not a document
- Source linkWrite it only in the first-line blockquote, do not repeat it at the end of the document—when merging multiple articles, repeated sources create a lot of noise; the prominent position on the first line is sufficient
- Merging multiple articles: insert two
<p></p>blank lines after "My thoughts" at the end of each section—visually clearly separate the sections and prevent content from running together - Only for plain pasted text should an H2 "Original text" section be appended at the end—URLs/files have traceable original sources and do not need the full text retained; pasted text is not traceable, so appending the original text ensures verifiability
Step 3: Create a note and write it in
⚠️
batch_editWriting rules:
- When multiple independent
insertoperations point to the same anchor, the actual order isthe reverseof the array order (WPS MCP behavior) → they need to be arranged in reverse order- When a single
insertoperation internally contains an XML string with multiple blocks, the order of the blocks is the order in which they appear in the document → no reverse order is needed; write in normal reading order
1. create_note({ title: "[内容标题] · 提炼 [YYYY-MM-DD]" })
2. get_note_outline(note_id) → 获取初始 block ID
3. batch_edit(note_id, [...]) → 倒序排列,一次性写入全部内容
4. sync_note(note_id) → 同步到云端(失败时见故障排查)
If content needs to be appended after writing, you must first call get_note_outline to refresh the block ID before performing the next write—after a WPS MCP write, the block ID may change, and using a cached ID will cause BLOCK_NOT_FOUND。
Quality check (required before writing)
- All modules defined by each template have been fully output, with no skips (text type: one-sentence summary / core viewpoints / key quote excerpts; image type: one-sentence summary / content interpretation / core information)
- Images have undergone visual analysis and are not skipped on the grounds that "the image cannot be processed"
- The source appears only in the first-line blockquote, with no repeated source at the end of the text
- The latest block ID was used (from
get_note_outline, not cached)
Example
Example 1: Extract a web article
The user says: "https://example.com/article help me summarize it" Execution:
WebFetch(url)Retrieve the body text- Extract a one-sentence summary, core viewpoints, and key quote excerpts
create_note→batch_editWrite to the note; the URL is written only in the first-line blockquote and is not repeated at the end
Example 2: Interpret a local image (path A)
The user says: "@/Users/zoez/Desktop/screenshot.png help me interpret this" or directly drags in a screenshot Execution:
Read(图片路径)→ AI visual analysis, extracting all text, charts, and interface elements in the imagecreate_noteCreate "[image topic] · Extract YYYY-MM-DD"batch_editWrite: 📌 One-sentence summary / 🔍 Content interpretation / 💡 Core information / 💬 My thoughts
Example 3: Merge multiple pieces of content
The user says: "https://a.com https://b.com and this passage of text [paste content], help me organize them into a note together" Execution:
- Retrieve each piece of content in sequence
create_noteTitle it "Content Extraction Collection · YYYY-MM-DD"- Write each piece as an independent section (1, 2, 3...) into the same note
- For pasted text, append the complete original text at the end; for URLs, append only the link
Example 4: Interpret an online image (path B, using WPS Notes' native image recognition)
The user says: "https://example.com/infographic.png help me interpret this" Execution:
create_noteCreate a noteinsert_image(url)Insert the image into the note and obtain the block_idread_image(note_id, block_id)Retrieve the base64- AI visually interprets the base64 content
edit_blockAppend the interpretation text below the image
Example 5: Interpret an existing image in a note (path D)
The user says: "Help me interpret the image in the note" Execution:
get_note_outline(note_id)Find the block_id with type="image"read_image(note_id, block_id)→ base64- AI visual interpretation
edit_blockInsert the interpretation content below the image
Image-type PDF/PPT processing workflow
When Read(pdf路径) extracts fewer than 50 characters of text, it is determined to be an image-type document, and the following workflow is executed:
1. Run the conversion script
python3 scripts/pdf_to_images.py /path/to/file.pdf
The script will automatically install pymupdf (if already installed, it passes instantly), saving each page as /tmp/pdf_pages_<pid>/page_NN.png(PID-isolated to avoid concurrent overwrites). See the complete script in scripts/pdf_to_images.py。
2. Page-by-page visual reading
For each page_NN.png in the script output directory, call Read(图片路径) for AI visual analysis, extracting all visible text and chart information on the page.
3. Summarize and then extract normally
Merge all page content and extract core viewpoints, key quote excerpts, etc. according to the standard workflow.
Process at most 40 pages; if there are more than 40 pages, process the first 40 pages and note in the note "Only the first 40 pages of content are extracted, N pages in total." The same applies to images embedded in web pages: first extract the image URL from the body text, then follow the online image processing path (
insert_image+read_image)。
Troubleshooting
| Situation | Handling method |
|---|---|
| URL is blocked / returns empty | Write according to the normal note structure: keep the source URL in a blockquote on the first line, then use h2 "❗ Access Restricted" + p "Access to this webpage is restricted. If extraction is needed, please manually copy the original text into an AI tool for processing." Do not retry. |
| PDF/PPT are image pages | Execute the image conversion process:① pip3 install pymupdf -q(skip if already installed) ② Run pdf_to_images.py to convert each page to PNG ③ Page by page Read(页面图片) visual analysis ④ After summarizing all page content, extract normally |
.docx reads garbled text |
Prompt the user to save as .txt and retry |
| Content too long (>10,000 characters) | Extract in segments and then merge; prompt the user that segmented processing is in progress |
| Content is empty | Inform "No extractable content found"; do not create a note |
| Unable to identify title | Infer from the first sentence of the body / H1 / file name; if unable to infer, use "Untitled Content Extraction" |
| Multilingual content | Extraction results are output uniformly in Chinese |
| Image format not supported (Read tool) | Only supports .png .jpg .jpeg .gif .webp; for other formats, use Shell conversion:sips -s format jpeg 原文件 --out 新文件.jpg |
IMAGE_FETCH_FAILED |
The image URL must directly return image/* content; if it fails, switch to Read(url图片) for direct visual analysis |
read_image returns empty |
An image block may need 1-2 seconds to render right after insertion; wait a moment and retry; confirm that the block_id comes from get_note_outline rather than cache |
| Web page images cannot be extracted | WebFetch cannot download image binaries; switch to the insert_image(img_url) + read_image path |
BLOCK_NOT_FOUND |
Call get_note_outline again to get the latest block ID; do not use a cached ID |
sync_note failed |
The note content has been written locally; prompt the user "Sync failed. The note content has been saved. Please manually sync in the WPS Notes client."; do not recreate the note |
WEBSOCKET_NOT_CONNECTED |
Prompt the user to check whether WPS Notes is open and logged in |