Skip to main content
Glama
grandmastr

Chronos MCP Server

connect_wallet

Connect to a Stellar blockchain wallet by providing your secret key to enable token management, balance queries, and fund transfers through the Chronos MCP Server.

Instructions

Connect to a Stellar wallet using secret key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
secretKeyYesStellar wallet secret key

Implementation Reference

  • The core handler function that implements the logic for connecting to a Stellar wallet. It uses the environment secret key to derive the public key, verifies the account exists, sets up analytics tracking, and returns a structured response.
    private async handleConnectWallet() {
      try {
        if (!secretKey) {
          return {
            content: [
              {
                type: 'text',
                text: 'No secret key provided',
              },
            ],
            isError: true,
          };
        }
    
        const keypair = stellar.Keypair.fromSecret(secretKey);
        const publicKey = keypair.publicKey();
    
        // Verify the account exists
        await stellarServer.loadAccount(publicKey);
    
        // Set the public key as the distinctId for analytics
        await setWalletPublicKey(publicKey);
    
        // Track the wallet_connected event
        await trackEvent('wallet_connected', { public_key: publicKey });
    
        // Track the MCP function call
        await trackMcpFunction('connect_wallet', { public_key: publicKey });
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(
                {
                  status: 'success',
                  message: 'Successfully connected to wallet',
                  publicKey: publicKey,
                },
                null,
                2
              ),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Failed to connect wallet: ${
                error instanceof Error ? error.message : String(error)
              }`,
            },
          ],
          isError: true,
        };
      }
    }
  • src/index.ts:68-80 (registration)
    Registers the 'connect_wallet' tool in the ListTools response, providing name, description, and input schema.
      name: 'connect_wallet',
      description: 'Connect to a Stellar wallet using secret key',
      inputSchema: {
        type: 'object',
        properties: {
          secretKey: {
            type: 'string',
            description: 'Stellar wallet secret key',
          },
        },
        required: ['secretKey'],
      },
    },
  • src/index.ts:143-149 (registration)
    Handles the CallToolRequest for 'connect_wallet' by checking the environment secret key and delegating to the specific handler method.
    case 'connect_wallet': {
      if (!secretKey) {
        throw new McpError(ErrorCode.InvalidParams, 'Secret key is required');
      }
    
      return await this.handleConnectWallet();
    }
  • Defines the input schema for the 'connect_wallet' tool, requiring a 'secretKey' string property.
    inputSchema: {
      type: 'object',
      properties: {
        secretKey: {
          type: 'string',
          description: 'Stellar wallet secret key',
        },
      },
      required: ['secretKey'],
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool connects using a secret key but doesn't describe what happens after connection (e.g., session persistence, error handling, or security implications like key storage). For a tool handling sensitive authentication with no annotation coverage, this is a significant gap in transparency.

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 a single, efficient sentence with zero waste. It is front-loaded with the core action and resource, making it easy to parse. Every word earns its place by specifying the tool's purpose clearly without redundancy.

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

Completeness2/5

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

Given the complexity of wallet connection (involving authentication and potential security concerns), no annotations, no output schema, and a single parameter, the description is incomplete. It doesn't explain what the tool returns (e.g., success status, wallet details) or behavioral aspects like error cases, leaving gaps for an AI agent to understand the tool fully.

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

Parameters3/5

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

The input schema has 100% description coverage, with the parameter 'secretKey' documented as 'Stellar wallet secret key'. The description adds no additional meaning beyond this, as it only repeats that connection uses a secret key. Baseline 3 is appropriate since the schema does the heavy lifting, but the description doesn't compensate or enhance parameter understanding.

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 action ('Connect to') and target resource ('a Stellar wallet'), specifying it uses a secret key. It distinguishes from sibling tools like get_balances or transfer_funds by focusing on authentication rather than querying or transactions. However, it doesn't explicitly differentiate from potential other connection methods (e.g., via public key or mnemonic), keeping it from a perfect score.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a secret key), when not to use it (e.g., if already connected), or how it relates to sibling tools like get_balances. The description implies usage for wallet connection but lacks explicit context or exclusions.

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/grandmastr/chronos-mcp'

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