Skip to main content
Glama

yax_get_capabilities

Read-onlyIdempotent

Discover all available tools, their descriptions, and usage guidance. Call this first to understand the platform's capabilities.

Instructions

Returns every tool available on this server, what each one does, and when to use it. Call this first when connecting to understand the platform.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
differentiatorsNoWhat makes YieldAgentX402 unique vs other MCP servers.
securityNoTEE enclave details, ShadeGuard policy engine, and receipt anchoring.
tool_categoriesNoAll available tool categories with tool names and recommended use cases.
getting_startedNoRecommended first call sequence for a new agent.

Implementation Reference

  • SDK method getCapabilities() — calls the remote MCP tool 'yax_get_capabilities' via the low-level call() method, which sends a JSON-RPC tools/call request to the MCP endpoint. This is the primary typed handler in the TypeScript SDK.
    getCapabilities(): Promise<CapabilitiesResponse> {
      return this.call<CapabilitiesResponse>("yax_get_capabilities");
    }
  • CapabilitiesResponse interface — defines the typed return shape for yax_get_capabilities, including platform, tagline, proof_points, differentiators, security, tool_categories, getting_started, rate_limits, idempotency, fees, and onboarding fields.
    export interface CapabilitiesResponse {
      ok: boolean;
      platform: string;
      tagline?: string;
      proof_points?: string[];
      differentiators?: Array<{ title: string; detail: string; check_with?: string }>;
      security?: Record<string, unknown>;
      tool_categories?: Array<{ category: string; tools: string[]; when_to_use?: string }>;
      getting_started?: Record<string, string>;
      rate_limits?: Record<string, unknown>;
      idempotency?: { supported_on: string[]; pass_via: string; window: string; replay_response: string };
      fees?: { protocol_fee_bps: number; description: string; rails_routed: string[] };
      onboarding?: Record<string, string>;
    }
  • YieldAgentX402DiscoveryTool — LangChain tool that calls 'yax_get_capabilities' via client.call_tool(). This is the LangChain integration handler for the capabilities tool.
    class YieldAgentX402DiscoveryTool(BaseTool):
        name: str = "yieldagentx402_discovery"
        description: str = (
            "Fetch YieldAgentX402 platform capabilities (public, no API key): differentiators, "
            "proof_points, rate_limits, fees, streaming, and onboarding URLs."
        )
        args_schema: Type[BaseModel] = EmptyInput
        mcp_client: Optional[YieldAgentMcpClient] = None
    
        def _run(self) -> str:
            client = self.mcp_client or YieldAgentMcpClient()
            result = client.call_tool("yax_get_capabilities", {})
            return json.dumps(result, indent=2, sort_keys=True)
  • YieldAgentX402ActionPlannerTool — LangChain tool that calls 'yax_get_capabilities' and extracts specific fields (platform, tagline, proof_points, getting_started, tool_categories, onboarding) to return a getting-started plan for agents.
    class YieldAgentX402ActionPlannerTool(BaseTool):
        name: str = "yieldagentx402_action_planner"
        description: str = (
            "Return the recommended getting_started sequence and tool categories from "
            "yax_get_capabilities — use before chaining other YieldAgent tools."
        )
        args_schema: Type[BaseModel] = EmptyInput
        mcp_client: Optional[YieldAgentMcpClient] = None
    
        def _run(self) -> str:
            client = self.mcp_client or YieldAgentMcpClient()
            caps = client.call_tool("yax_get_capabilities", {})
            plan = {
                "platform": caps.get("platform"),
                "tagline": caps.get("tagline"),
                "proof_points": caps.get("proof_points"),
                "getting_started": caps.get("getting_started"),
                "tool_categories": caps.get("tool_categories"),
                "onboarding": caps.get("onboarding"),
            }
            return json.dumps(plan, indent=2, sort_keys=True)
  • callTool() method in YieldAgentMcpClient — contains special-case logic allowing 'yax_get_capabilities' to be called without an API key (introspectionOnly mode). The actual tool call is proxied to the remote MCP server via client.callTool().
    async callTool(params: CallToolRequest["params"]) {
      if (this.config.introspectionOnly && !this.config.apiKey) {
        const name = params?.name ?? "";
        if (name !== "yax_get_capabilities") {
          throw new Error(
            "YAX_API_KEY is required for tools/call (except yax_get_capabilities). Get a key at https://yieldagentx402.app/apply."
          );
        }
      }
    
      const client = await this.connectedClient();
      return client.callTool(params);
    }
  • Low-level call() method — the underlying JSON-RPC mechanism used by getCapabilities() to send a 'tools/call' request with the tool name and arguments to the MCP endpoint.
    async call<T = GenericToolResponse>(
      toolName: string,
      args: Record<string, unknown> = {},
      extraHeaders: Record<string, string> = {},
    ): Promise<T> {
      const body: JsonRpcEnvelope = {
        jsonrpc: "2.0",
        id: ++this._id,
        method: "tools/call",
        params: { name: toolName, arguments: args },
      };
    
      const headers: Record<string, string> = {
        "Content-Type": "application/json",
        ...extraHeaders,
      };
      if (this.apiKey)  headers["Authorization"] = `Bearer ${this.apiKey}`;
      if (this.agentId) headers["X-Agent-ID"] = this.agentId;
    
      let attempt = 0;
      while (true) {
        const res = await fetch(this.endpoint, {
          ...this._fetchInit,
          method: "POST",
          headers,
          body: JSON.stringify(body),
        });
    
        if (res.status === 429 && attempt < this.maxRetries) {
          const retryAfter = Number(res.headers.get("Retry-After") || "1");
          await new Promise(r => setTimeout(r, Math.max(retryAfter, 1) * 1000));
          attempt++;
          continue;
        }
    
        const json = await res.json();
        if (json.error) {
          throw new YAXError(json.error.message || "JSON-RPC error", "RPC_ERROR", {
            rpcCode: json.error.code,
            raw: json.error,
          });
        }
    
        const result = json.result;
        // MCP 2025-06-18: prefer structuredContent. Fall back to parsing content[0].text.
        const payload = (result?.structuredContent ?? this._parseTextContent(result)) as T & { ok?: boolean; error?: { code?: string; message?: string; hint?: string } };
    
        if (payload && payload.ok === false && payload.error) {
          throw new YAXError(payload.error.message || "Tool error", payload.error.code || "TOOL_ERROR", {
            hint: payload.error.hint,
            raw: payload,
          });
        }
        return payload;
      }
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide readOnlyHint, idempotentHint, etc. The description adds context on response content (tool descriptions and usage). No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with verb 'Returns', and no extraneous words. Highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the existence of an output schema and the tool's simple discovery function, the description fully covers what the tool does and when to use it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist, so baseline 4. No additional parameter information needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns every tool available, their purpose, and usage. It distinctly positions itself as a discovery tool, differentiating from sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly instructs 'Call this first when connecting to understand the platform.' While it doesn't mention when not to use or alternatives, the guidance is clear for its role.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Fabio662/yieldagentx402-sdks'

If you have feedback or need assistance with the MCP directory API, please join our Discord server