GraphQL Endpoint Discovery
Use this skill before ask-graphql-mcp when the user did not provide an endpoint URL.
Primary goal
Discover likely The Graph project candidates and construct endpoint candidates in this format:
https://gateway.thegraph.com/api/<Test Key>/subgraphs/id/[id]
Keep <Test Key> literal. Do not replace it.
Trigger
Run this skill when all are true:
- User asks GraphQL/SubQuery/SubGraph data analysis or query execution
- User did not provide a usable endpoint URL
- User request includes at least one topic keyword (protocol, project, chain, metric, etc.)
If user already provided endpoint URL, skip this skill and proceed to ask-graphql-mcp.
Deterministic invocation rules
Use this exact routing logic:
- If user message contains explicit endpoint URL (
http://orhttps://) -> do not call this skill. - If no endpoint URL and task is GraphQL/SubQuery/SubGraph related -> call this skill.
- If no endpoint URL and task is not GraphQL related -> do not call this skill.
- After this skill returns:
recommended endpointexists -> callask-graphql-mcpwith that endpoint.- only medium-confidence candidates -> ask user to pick one candidate first.
- no candidates -> ask user for endpoint directly.
Do not call this skill more than once per user turn unless user provides new keywords/constraints.
Search API
Use:
https://ask-api.hermes-subnet.ai/indexing/projects/search?q=[keywords]&limit=6
Rules:
- Build
keywordsfrom user intent (project name + chain + metric/domain when available) - URL-encode keywords
- Keep
limit=6
Expected response shape:
data[]with fields includingid,source,type,name,description,network,updated_at
Candidate selection workflow
- Call search API with extracted keywords.
- Drop obvious mismatches:
- unrelated name/description
- wrong chain/network when user explicitly constrained chain
- stale or vague entries when better matches exist
- Prioritize candidates by:
- semantic match to user intent (
name+description) - explicit network match
- recency (
updated_at) - source/type confidence (prefer
THE_GRAPH+SUBGRAPHwhen targeting The Graph gateway format)
- Produce up to 3 endpoint candidates by combining each selected
id:
https://gateway.thegraph.com/api/<Test Key>/subgraphs/id/[id]
- Handoff to downstream agent (or
ask-graphql-mcp) with:
- recommended endpoint (if confidence is high)
- backup candidates (if ambiguity exists)
- one-line rationale per candidate
Decision policy
If at least one candidate is high-confidence:
- continue with
ask-graphql-mcpusing the recommended endpoint candidate first - do not execute direct GraphQL query in this skill
If only medium-confidence candidates exist:
- provide 2-3 candidates and ask user to confirm one before running deeper analysis
If no valid candidate exists:
- ask user for endpoint URL directly
Output contract
Return concise structured output:
- Search keywords used
- Candidate list (id, name, network, endpoint)
- Recommended endpoint or
none - Next action:
proceed_with_ask_graphql_mcpask_user_to_confirm_candidateask_user_for_endpoint
Handoff rule:
- When next action is
proceed_with_ask_graphql_mcp, downstream execution must use Ask MCP path, not hand-written direct GraphQL execution.