MCP 服务器
list_locations
列出该连接可见的地点(Google 商家资料),以及你在每个地点的角色和是否可以发布回复。
5 分钟阅读更新于
功能说明
列出该连接可见的地点(Google 商家资料),以及你在每个地点的角色和是否可以发布回复。
- 从这里开始:其他工具都使用本工具返回的
id和workspace_id。 your_role为owner、admin、editor或viewer。editor在 Repliq 应用中显示为“Manager”。
权限与限制
| 属性 | 值 |
|---|---|
| 权限 | repliq:read |
| 类型 | 读取 |
| 每小时预算 | 无 |
| 套餐配额 | 无 |
| 行为提示 | 只读 · 仅限 Repliq 内部 |
参数
此工具没有参数。
示例
一次完整调用,分别给出原始 JSON-RPC 请求和官方 MCP SDK 的写法。把 REPLIQ_TOKEN 换成访问令牌或个人令牌(参见认证),并把 id 换成你自己通过 list_locations 得到的值。
curl -sS https://repliqds.com/api/mcp \
-H "Authorization: Bearer $REPLIQ_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_locations","arguments":{}}}'import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
const client = new Client({ name: "my-script", version: "1.0.0" });
await client.connect(new StreamableHTTPClientTransport(new URL("https://repliqds.com/api/mcp"), {
requestInit: { headers: { Authorization: `Bearer ${process.env.REPLIQ_TOKEN}` } },
}));
const result = await client.callTool({
name: "list_locations",
arguments: {},
});
console.log(result.structuredContent);本示例的参数已在 Repliq 自己的测试中按该工具的输入模式校验通过。
响应
调用成功时会返回两份相同的 JSON:一份在 structuredContent 中,另一份序列化在文本块中。其顶层字段为:
locationscount
错误
调用失败时返回 isError: true,文本为 JSON:{ "error": 错误码, "message": … }。除了不符合输入模式的参数(会在工具运行前被拒绝)外,该工具可能返回:
| 错误码 | 含义 | 处理方法 |
|---|---|---|
TEMPORARILY_UNAVAILABLE | Repliq 暂时无法完成请求,或无法检查每小时预算(此时会安全失败,不执行任何操作)。 | 稍后重试。 |
服务器发布的描述
Lists the business locations (Google Business Profiles) this connection can see, with your role and whether replies can be published.
相关工具
相关文档
这个页面对你有帮助吗?
没有找到需要的内容?
查看常见问题,或给我们写信,我们会帮助你。
常见问题