SuperAPI AI Directory

mo-misc

Office & productivity

View repository

Updated 10-16 06:49

About this skill

Prerequisites

CRITICAL — first read 共享规则, which contains mocli initialization, authentication, output parsing, and security rules

mocli misc - Mowen general-purpose tool

This skill guides you to use mocli misc to complete general auxiliary operations. The current main capability is uploading local or remote files and obtaining a file_id。

mocli misc upload [--file] [--url] [--filename]

This command is used to upload a local file or remote file URL to Mowen. After a successful upload it returns reply.file_id, and returns metadata such as filename, MIME, size, and file_meta as much as possible.

When to use

  • Use this command when the user explicitly requests "upload a file to Mowen", "upload an image/audio/PDF", or "upload this URL as a Mowen file".
  • When the user wants to create or edit a note and needs to first obtain the file_id for an image, audio, or PDF, first use this command to upload the file, then use the returned file_id in subsequent content construction.
  • If the user only wants to reference an existing public URL and the target interface explicitly supports direct URL links, do not upload automatically; only upload when Mowen file_id is needed.

Optional parameters

  • --file string: local file path. Choose one of this and --url ; they cannot be passed at the same time.
  • --url string: remote file URL. Choose one of this and --file ; they cannot be passed at the same time.
  • --filename string: optional upload filename. Used for the server-side display name and the upload form filename; when not passed, local files default to the basename of the path, and remote URLs are not forcibly inferred by default.

Usage principles

  • --file and --url must be provided and only one may be provided; if the user gives both a local path and a URL, first ask which one to upload.
  • For local file paths, it is recommended to use absolute paths to avoid file-not-found errors caused by inconsistent working directories.
  • Do not add --filetype; the CLI will read the file content or the first 512 bytes of the remote response and automatically identify the type based on MIME.
  • Currently supports uploading images, audio, and PDFs; HTML, plain text, archives, video, or unknown MIME types will be rejected.
  • Size limits: images less than 50MB, audio less than 200MB, PDF less than 100MB. If the file provided by the user clearly exceeds the limit, explain the limit first and do not blindly attempt it.
  • Uploading a local file or remote URL will submit the file content to the Mowen server; if the file may contain private or sensitive information, confirm before execution that the user really wants to upload it.
  • For remote URLs, the upload process will have the CLI download the content of that URL; if the URL requires a login session, temporary signature, or intranet access, it may fail, and you should prompt the user to provide a link that is publicly accessible or accessible in the current environment.
  • After execution, parse the top-level code、status、reasonaccording to the shared rules; on success, display reply.file_id, and use reply.file_type、reply.file_name、reply.file_mime、reply.file_size、reply.file_metaas needed for the task; on failure, display actionable information such as reason、msg、meta.hints .

Usage examples

  • Upload local image mocli misc upload --file /path/to/avatar.png
  • Upload local PDF and specify display name mocli misc upload --file /path/to/report.pdf --filename "产品报告.pdf"
  • Upload remote image URL mocli misc upload --url "https://example.com/image.png" --filename "image.png"
  • Upload local audio mocli misc upload --file /path/to/audio.wav

Output example

{
  "code": 0,
  "status": "OK",
  "reply": {
    "file_id": "F_uploaded",
    "file_type": "AUDIO",
    "file_name": "audio.mp3",
    "file_mime": "audio/mpeg",
    "file_size": 3790598,
    "file_meta": "{\"duration\":236.878367,\"format\":\"mp3\",\"format_name\":\"mp3\"}"
  }
}

reply field description

Field Type Description
file_id string The MoWen file ID after a successful upload, which can be used for subsequent notes, comments, or other interfaces that support file references.
file_type string File type, usually IMAGE、AUDIO or PDF。
file_name string The file name used during upload or recorded by the server.
file_mime string File MIME, for example image/jpeg、audio/mpeg、application/pdf。
file_size number File size, in bytes.
file_meta string File metadata JSON string; fields differ by file type, for example audio may include duration, images may include width/height。
Display rules

** Reference ** 公共展示规则