Skip to main content
Glama

setup

Read-onlyIdempotent

Display credential status and step-by-step instructions to obtain missing pay token and buyer JWT for the USDC payment proxy.

Instructions

Show the LemonCake MCP first-run setup guide. No authentication required. Call this tool FIRST to learn what credentials are missing and how to obtain them.

Returns the current credential status (Pay Token / Buyer JWT) and step-by-step instructions to obtain anything that is missing, including a sample MCP client config snippet ready to paste.

Returns: { version, apiUrl, credentials, availableTools, setupSteps, register, dashboard, docs } Errors: none — this tool always succeeds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool handler for 'setup' — returns credential status (payToken/buyerJwt), step-by-step setup instructions in Japanese, a sample MCP client config snippet, version info, URLs for registration/billing/dashboard, and the list of available tools grouped by auth requirement. No authentication needed.
    case "setup": {
      const status = {
        payToken:  hasPayToken ? "✓ 設定済み" : "✗ 未設定(call_service が使えません)",
        buyerJwt:  hasBuyerJwt ? "✓ 設定済み" : "✗ 未設定(check_balance が使えません)",
      };
    
      const steps: string[] = [];
    
      if (!hasPayToken || !hasBuyerJwt) {
        steps.push("=== セットアップ手順 ===");
        steps.push("");
        steps.push("1. 無料アカウント作成(3分で完了)");
        steps.push(`   → ${REGISTER_URL}`);
        steps.push("");
        steps.push("2. USDC残高をチャージ($5〜)");
        steps.push(`   → ${BILLING_URL}`);
        steps.push("   JPYCまたはUSDCで入金可能");
        steps.push("");
      }
    
      if (!hasPayToken) {
        steps.push("3. Pay Tokenを発行(call_service に必要)");
        steps.push("   Dashboard → Tokens → 「Pay Tokenを発行」");
        steps.push("   ・serviceId: 使いたいサービスのIDを選択");
        steps.push("   ・limitUsdc: このトークンで使える上限額(例: 5.00)");
        steps.push("   → 発行されたJWTをコピー");
        steps.push("");
        steps.push("4. MCP設定ファイルに追加:");
        steps.push('   "LEMON_CAKE_PAY_TOKEN": "<コピーしたJWT>"');
        steps.push("");
      }
    
      if (!hasBuyerJwt) {
        steps.push(!hasPayToken ? "5." : "3." + " Buyer JWTを取得(check_balance に必要)");
        steps.push("   Dashboard → Settings → 「Buyer JWTをコピー」");
        steps.push('   "LEMON_CAKE_BUYER_JWT": "<コピーしたJWT>"');
        steps.push("");
      }
    
      steps.push("=== MCP設定ファイルのサンプル ===");
      steps.push("");
      steps.push(JSON.stringify({
        mcpServers: {
          "lemon-cake": {
            command: "npx",
            args:    ["-y", "lemon-cake-mcp"],
            env: {
              LEMON_CAKE_PAY_TOKEN:  hasPayToken ? "(設定済み)" : "<ダッシュボードで発行したPay Token JWT>",
              LEMON_CAKE_BUYER_JWT:  hasBuyerJwt ? "(設定済み)" : "<ダッシュボードのSettingsからコピーしたJWT>",
            },
          },
        },
      }, null, 2));
    
      return json({
        version:       MCP_VERSION,
        apiUrl:        API_URL,
        credentials:   status,
        availableTools: {
          noAuth:       ["setup", "list_services", "get_service_stats", "check_tax"],
          needPayToken: ["call_service"],
          needBuyerJwt: ["check_balance"],
        },
        setupSteps: steps.length > 0 ? steps.join("\n") : "✅ 全ての認証情報が設定されています。",
        register:   REGISTER_URL,
        dashboard:  DASHBOARD_URL,
        docs:       "https://github.com/evidai/lemon-cake",
      });
    }
  • Tool registration/schema for 'setup' — defines name, description, annotations (readOnlyHint, idempotentHint, etc.), and an empty inputSchema (no parameters).
    // ─── setup(認証不要) ────────────────────────────────────────────────
    {
      name: "setup",
      description: [
        "Show the LemonCake MCP first-run setup guide. No authentication required.",
        "Call this tool FIRST to learn what credentials are missing and how to obtain them.",
        "",
        "Returns the current credential status (Pay Token / Buyer JWT) and step-by-step",
        "instructions to obtain anything that is missing, including a sample MCP client",
        "config snippet ready to paste.",
        "",
        "Returns: { version, apiUrl, credentials, availableTools, setupSteps, register, dashboard, docs }",
        "Errors: none — this tool always succeeds.",
      ].join("\n"),
      annotations: {
        title:           "Setup guide",
        readOnlyHint:    true,
        destructiveHint: false,
        idempotentHint:  true,
        openWorldHint:   false,
      },
      inputSchema: { type: "object", properties: {}, additionalProperties: false },
    },
  • The ListToolsRequestSchema handler that registers all tools, including 'setup', via the tools array.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
  • URL constants (REGISTER_URL, DASHBOARD_URL, BILLING_URL, DOCS_URL) used by the setup handler to generate setup instructions.
    const UTM            = "utm_source=mcp-server&utm_medium=cli";
    const REGISTER_URL   = `https://lemoncake.xyz/register?${UTM}&utm_campaign=credential-missing`;
    const DASHBOARD_URL  = `https://lemoncake.xyz/dashboard?${UTM}`;
    const BILLING_URL    = `https://lemoncake.xyz/dashboard/billing?${UTM}&utm_campaign=topup`;
    const DOCS_URL       = `https://lemoncake.xyz/docs/quickstart?${UTM}`;
  • The credentialError helper function referenced by other tools, which also mentions the 'setup' tool as a tip for full instructions.
    /** 未設定の認証情報に対して、取得方法を含む分かりやすいエラーを返す */
    function credentialError(envVar: string, toolName: string) {
      return {
        content: [{
          type: "text" as const,
          text: JSON.stringify({
            error: `${envVar} is not configured.`,
            code:  "CREDENTIAL_MISSING",
            howToFix: [
              `1. Create a free account → ${REGISTER_URL}`,
              `2. Top up balance ($5 USDC or JPYC) → ${BILLING_URL}`,
              envVar === "LEMON_CAKE_PAY_TOKEN"
                ? `3. Dashboard → Tokens → Issue Pay Token (set your spending limit) → ${DASHBOARD_URL}`
                : `3. Dashboard → Settings → Copy your Buyer JWT → ${DASHBOARD_URL}`,
              `4. Add to your MCP client config:`,
              `   "env": { "${envVar}": "<paste token here>" }`,
              `5. Restart your MCP client`,
            ],
            docs: DOCS_URL,
            tip: `You can also call the 'setup' tool to see full setup instructions.`,
          }, null, 2),
        }],
        isError: true,
      };
    }
Behavior5/5

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

Annotations already indicate readOnlyHint=true, destructiveHint=false, and idempotentHint=true. The description adds further transparency by stating 'Errors: none — this tool always succeeds' and detailing the return structure, which goes beyond annotations.

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?

The description is concise, with every sentence adding value. It is front-loaded with the main purpose and structured logically, making it easy to parse.

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 tool has no parameters and no output schema, the description is fully complete. It covers purpose, usage, return format, and error behavior, leaving no gaps.

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?

The tool has zero parameters, so schema description coverage is 100%. The description adds no parameter-level detail, but the baseline for zero parameters is 4, and the description provides useful context about the return value.

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

Purpose4/5

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

The description clearly states the verb 'Show' and the resource 'LemonCake MCP first-run setup guide'. It distinguishes itself from siblings by indicating it should be called first, but does not explicitly name alternatives.

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?

The description explicitly says 'Call this tool FIRST' and notes that no authentication is required, providing clear usage context. However, it does not state when not to use or provide explicit alternatives.

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/evidai/lemon-cake'

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