跳到正文
cccskills
免费在 GitHub 公开

unique-cli-mcp

Call MCP (Model Context Protocol) server tools on the Unique AI Platform using the unique-cli mcp command. Use when the user asks to invoke, call, or execute an MCP tool, or when they need to send a JSON payload to an MCP server through the CLI. The JSON payload is forwarded 1:1 to the platform's MCP call-tool API.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md5.3 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Unique CLI -- MCP Tool Calls

Call MCP server tools registered on the Unique AI Platform directly from the command line. The JSON payload containing the tool name and arguments is forwarded 1:1 to the platform API.

JSON Payload Schema

The payload is a JSON object with two fields:

{
  "name": "tool_name",
  "arguments": {
    "param1": "value1",
    "param2": 42,
    "nested": {"key": "value"}
  }
}
FieldRequiredDescription
nameYesThe MCP tool name to invoke
argumentsNoObject of key-value arguments (defaults to {})

Basic Usage

# Call an MCP tool with inline JSON
unique-cli mcp -c <chat_id> -m <message_id> \
  '{"name": "search_documents", "arguments": {"query": "quarterly report"}}'

# Short form
unique-cli mcp -c chat_abc123 -m msg_def456 \
  '{"name": "get_weather", "arguments": {"city": "Zurich"}}'

Input Sources

The JSON payload can come from three sources (exactly one required):

Inline JSON (positional argument)

unique-cli mcp -c chat_123 -m msg_456 '{"name": "tool", "arguments": {"key": "value"}}'

From a file

unique-cli mcp -c chat_123 -m msg_456 --file payload.json

From stdin (pipe)

cat payload.json | unique-cli mcp -c chat_123 -m msg_456 --stdin

echo '{"name": "tool", "arguments": {}}' | unique-cli mcp -c chat_123 -m msg_456 --stdin

Command Reference

unique-cli mcp [--chat-id <id>] [--message-id <id>] [PAYLOAD | --file <path> | --stdin]
OptionShortRequiredDescription
--chat-id-cYesChat ID for the conversation context
--message-id-mNoMessage ID for the conversation context. Optional — resolved from $UNIQUE_TURN_IDENTITY_FILE (preferred) or $UNIQUE_MESSAGE_ID when omitted.
PAYLOADOne of threeInline JSON string
--file-fOne of threePath to a JSON file
--stdinOne of threeRead JSON from stdin

Output Format

MCP tool call: search_documents
Server: mcp_srv_abc123

[text] Search completed successfully. Found 3 results.
[text] 1. Annual Report 2025 — Revenue grew 15% year-over-year...

Each content item is prefixed with its type: [text], [image], [audio], [resource_link], or [resource].

Error responses show (ERROR) in the header:

MCP tool call: search_documents (ERROR)
Server: mcp_srv_abc123

[text] Tool execution failed: invalid argument "limti"

Scripting Examples

Call a tool and capture output

result=$(unique-cli mcp -c chat_123 -m msg_456 \
  '{"name": "summarize", "arguments": {"document_id": "doc_789"}}')
echo "$result"

Build payload dynamically

payload=$(jq -n \
  --arg name "search_documents" \
  --arg query "$SEARCH_QUERY" \
  '{"name": $name, "arguments": {"query": $query}}')

unique-cli mcp -c chat_123 -m msg_456 "$payload"

Pipe from a generated payload

python generate_payload.py | unique-cli mcp -c chat_123 -m msg_456 --stdin

Citation Rules

Cite a fact retrieved from an MCP tool with [mcpsourceN], where N matches the sourceNumber the command printed in the Sources footer beneath the tool output. Each footer line names one retrieved item; cite a fact with the marker of the specific item it came from. The Unique platform's Swappable Intelligence runner converts each [mcpsourceN] marker in your final answer into a <sup>N</sup> footnote and a display-only reference chip labelled with the retrieved item and the MCP tool name (e.g. "RAG Retrieval Baseline — Retrieve Confluence page (MCP)"). Without [mcpsourceN] markers, MCP-retrieved facts in your answer appear as plain text only, with no footnote and no chip.

ACME's Q3 revenue was 1.2M [mcpsource1], up from 0.9M a year earlier [mcpsource2].

Rules (enforced by the platform's reference post-processor, which reads .unique/mcp-refs.jsonl rather than your prose):

  1. [mcpsourceN] is for MCP tool results only. Knowledge-base results from unique-cli search use [sourceN], and public web results from unique-cli web-search use [websourceN] — never mix the namespaces.
  2. Only cite numbers you saw in the current turn's MCP Sources footer. Numbers from previous turns are stale and will be silently dropped.
  3. Write mcpsource in singular form with the number in digits: [mcpsource1], [mcpsource2] — not [McpSource 1] or [mcpsource one].
  4. The same retrieved item keeps one stable [mcpsourceN] for the whole turn, so every fact from that item uses the same marker.
  5. Do not invent source numbers for remembered or inferred facts.

Prerequisites

Requires these environment variables:

UNIQUE_USER_ID    # User ID (required)
UNIQUE_COMPANY_ID # Company ID (required)
UNIQUE_API_KEY    # API key — optional on localhost / secured cluster
UNIQUE_APP_ID     # App ID — optional on localhost / secured cluster

Install: pip install unique-sdk

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Implement comprehensive error handling for Python code paths to keep services resilient and user-friendly. Use when failures are currently silent or exceptions leak through.

中文简介正在准备中。当前显示原文说明。

Unique-AG/ai52026年10月20日 更新

Tabular and numerical data analysis with descriptive statistics and insights. Use when the user provides data, tables, CSVs, or numbers and wants analysis.

中文简介正在准备中。当前显示原文说明。

Unique-AG/ai52026年10月20日 更新

Financial factsheet analysis with key metrics extraction and investment rationale

中文简介正在准备中。当前显示原文说明。

Unique-AG/ai52026年10月20日 更新

ci-fix

免费

Diagnose and fix CI failures without leaving your editor.

中文简介正在准备中。当前显示原文说明。

Unique-AG/ai52026年10月20日 更新

Reproduce ai-repo PR checks locally with Poe and CI scripts, including per-package typecheck and coverage behavior. Use when validating changes before push or when user asks which local commands match CI.

中文简介正在准备中。当前显示原文说明。

Unique-AG/ai52026年10月20日 更新

Ask clarifying questions before implementing to ensure Python requirements are understood. Use when a task lacks detail, dependencies are unclear, or multiple interpretations are possible.

中文简介正在准备中。当前显示原文说明。

Unique-AG/ai52026年10月20日 更新

查看 Unique-AG 的全部技能

报告此技能的问题