询问

人工智能 社区

技能解读

当前原文的自动摘译,尚未人工审校。

主要目标

通过转发自然语言任务并返回特定于端点的答案来使用 MCP 工具。不要使用直接 GraphQL 调用作为默认行为。首先使用MCP。

硬约束:无直接查询绕过

触发此技能时,始终通过 Ask GraphQL MCP(graphql_agent 或 MCP JSON-RPC 路径)执行,即使模型可以自行编写 GraphQL 查询。仅当用户明确请求绕过 Ask MCP 时,才允许直接执行 GraphQL。

所需的输入

在分析之前收集这些输入: 用户问题或任务(必需) GraphQL 端点 URL(执行所需;可以通过graphql-endpoint-discovery发现) 计划模式:默认free;仅当达到免费套餐限制或用户明确询问 API 密钥(付费模式需要)时才切换到paid

确定性调用规则

使用这个精确的路由逻辑:如果任务与 Web3/链上相关并且用户消息包含显式端点 URL(http:// 或 https://)-> 直接调用此技能。如果任务与 Web3/链上相关,但缺少端点 URL -> 首先调用graphql-endpoint-discovery,然后仅在端点解析时返回此处。如果任务显然是非Web3且非链上的 -> 不要调用此技能。在一个用户回合中,最多允许一条执行路径:

MCP 连接策略

默认为免费网关:https://ask-api.hermes-subnet.ai/mcp/graphql-agent 仅在需要时使用付费网关:https://ask-api.hermes-subnet.ai/mcp 始终将 X-ENDPOINT 设置为用户端点 仅当上游端点需要身份验证时才设置 X-ENDPOINT-AUTHORIZATION 在付费模式下,包括 X-API-KEY

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
人工智能
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
88 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@tomevault-io · 未声明许可证
上下文用量评级
低消耗
接入复杂程度
需简单配置
是否需要外部接口密钥
需要 · Vendor-specific
兼容的系统
未声明(默认跨平台)
运行环境要求
未检出明确要求
检测到的文件与系统行为
  • 只读
  • 允许写入 / 修改
  • 命令执行
网络行为
允许外网请求
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

# Ask GraphQL MCP

Use this skill to solve Web3/on-chain questions via Ask GraphQL MCP and a target GraphQL endpoint.

## Primary goal

Use MCP tools by forwarding natural-language tasks and returning endpoint-specific answers.

Do not use direct GraphQL calls as default behavior. Use MCP first.

## Hard constraint: no direct-query bypass

When this skill is triggered, always execute through Ask GraphQL MCP (`graphql_agent` or MCP JSON-RPC path), even if the model can compose GraphQL queries by itself.

Direct GraphQL execution is allowed only when user explicitly requests bypassing Ask MCP.

## Required inputs

Collect these inputs before analysis:
- User question or task (required)
- GraphQL endpoint URL (required for execution; can be discovered via `graphql-endpoint-discovery`)
- Plan mode: default `free`; switch to `paid` only when free-tier limit is reached or user explicitly asks
- API key (required for paid mode)
- Optional `X-ENDPOINT-AUTHORIZATION` when upstream endpoint is private

When endpoint URL is missing:
1. Run pre-skill `graphql-endpoint-discovery`
2. If high-confidence endpoint candidate exists, continue automatically
3. If ambiguous, ask user to confirm among top candidates
4. If no candidate, ask user for endpoint directly

## Deterministic invocation rules

Use this exact routing logic:
1. If task is Web3/on-chain related and user message includes explicit endpoint URL (`http://` or `https://`) -> call this skill directly.
2. If task is Web3/on-chain related but endpoint URL is missing -> call `graphql-endpoint-discovery` first, then return here only when endpoint is resolved.
3. If task is clearly non-Web3 and non-on-chain -> do not call this skill.
4. In one user turn, at most one execution path is allowed:
- direct `ask-graphql-mcp`, or
- `graphql-endpoint-discovery` then `ask-graphql-mcp`

Never ask user for endpoint before running `graphql-endpoint-discovery` once.
Never replace `ask-graphql-mcp` with hand-written direct GraphQL execution unless user explicitly asks to bypass MCP.

## MCP connection policy

1. Default to free gateway: `https://ask-api.hermes-subnet.ai/mcp/graphql-agent`
2. Use paid gateway only when needed: `https://ask-api.hermes-subnet.ai/mcp`
3. Always set `X-ENDPOINT` to the user endpoint
4. Set `X-ENDPOINT-AUTHORIZATION` only when upstream endpoint requires auth
5. In paid mode, include `X-API-KEY`

Use templates from `references/config-templates.md` when you need to emit copy-ready JSON.

## Agent execution workflow

1. Confirm endpoint and user objective. If endpoint is missing, run `graphql-endpoint-discovery` first.
2. Prefer session tool path: if `graphql_agent` is available in current session tool list, use it.
3. If session tool is unavailable, use HTTP JSON-RPC path to Ask MCP gateway with required headers (`X-ENDPOINT`, optional `X-ENDPOINT-AUTHORIZATION`, and `X-API-KEY` in paid mode).
4. Send the user task to MCP in natural language.
5. Timeout policy: when question complexity is high, allow MCP/agent call timeout up to 2 minutes (120s) before treating it as failed.
6. If needed, send one follow-up clarification prompt to MCP.
7. Return MCP result with concise interpretation for the user.

## HTTP JSON-RPC path (when session tool is unavailable)

Use MCP gateway endpoint:
- Free: `https://ask-api.hermes-subnet.ai/mcp/graphql-agent`
- Paid: `https://ask-api.hermes-subnet.ai/mcp`

Call sequence:
1. `tools/list` to verify `graphql_agent` is exposed by gateway
2. `tools/call` with:
- `name: "graphql_agent"`
- `arguments.question: <user natural-language request>`

This path still uses MCP, not direct GraphQL querying.

## Fallback workflow

If the task fails:
1. Validate gateway URL matches current mode (free/paid).
2. Validate `X-ENDPOINT` format and reachability.
3. Validate `X-ENDPOINT-AUTHORIZATION` for private endpoints.
4. Validate `X-API-KEY` in paid mode.
5. Retry with minimal known-good config.

If MCP returns free-tier rate limit/quota errors:
- Guide user to create API key at `https://ask.hermes-subnet.ai/billing/api-keys/`
- Switch user to paid gateway `https://ask-api.hermes-subnet.ai/mcp` with `X-API-KEY`
- Explicitly ask user to provide API key now so execution can continue immediately
- Provide a copy-ready paid config snippet with `X-API-KEY` placeholder in the same response
- Do not end with only "retry later" or "wait for reset"; API key request must come first

If paid API key quota is exceeded:
- Guide user to check usage/quota at `https://ask.hermes-subnet.ai/billing/`

## Response standard

For endpoint analysis requests, structure responses as:
1. Assumptions
2. MCP answer summary
3. Optional query/details provided by MCP
4. Next step (run/verify/debug)

For pure setup requests, provide one copy-ready JSON block plus a short verification checklist.

When mentioning quota/rate-limit failures, always include the correct billing link:
- API key creation: `https://ask.hermes-subnet.ai/billing/api-keys/`
- Usage/quota check: `https://ask.hermes-subnet.ai/billing/`

For free-tier limit errors, treat API key guidance as highest-priority next action:
- First line should clearly request API key from user
- Include API key creation link in the same message
- Include paid-mode gateway and required header keys

## Rate-limit detection and mandatory wording

Treat these as free-tier limit signals:
- `rate limit exceeded`
- `quota exceeded`
- `too many requests`
- `retryAfter`
- `429`

When any signal appears, reply with this mandatory first sentence pattern:
- `Free quota reached. Please create an API key at https://ask.hermes-subnet.ai/billing/api-keys/ and send it here so I can continue now.`

Then include:
1. Paid gateway URL: `https://ask-api.hermes-subnet.ai/mcp`
2. Required paid header: `X-API-KEY`
3. If relevant, quota page: `https://ask.hermes-subnet.ai/billing/`

For practical prompt patterns, read `references/tools-and-prompts.md`.

---
> Source: [ComeOnOliver/skillshub](https://github.com/ComeOnOliver/skillshub) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-22 -->

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。