Skip to main content
Glama

update_external_market_config

Modify and synchronize external market data API configurations, including URL, API key, and symbol mappings, for accurate and up-to-date market data integration.

Instructions

Update the configuration for external market data API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiKeyNoAPI key for external market data (if required)
apiUrlNoAPI URL for external market data
symbolsNoSymbol mappings for the external API

Implementation Reference

  • src/index.ts:634-665 (registration)
    Tool registration in the listTools response, including name 'update_external_market_config', description, and inputSchema definition.
    {
      name: 'update_external_market_config',
      description: 'Update the configuration for external market data API',
      inputSchema: {
        type: 'object',
        properties: {
          apiUrl: {
            type: 'string',
            description: 'API URL for external market data',
          },
          apiKey: {
            type: 'string',
            description: 'API key for external market data (if required)',
          },
          symbols: {
            type: 'object',
            properties: {
              EDU: {
                type: 'string',
                description: 'Symbol for EDU token on the external API',
              },
              USD: {
                type: 'string',
                description: 'Symbol for USD on the external API',
              },
            },
            description: 'Symbol mappings for the external API',
          },
        },
        required: [],
      },
    },
  • MCP tool handler for 'update_external_market_config' that parses the input arguments, constructs the newConfig object, calls external_market.updateConfig(newConfig), retrieves current config, and returns success response with updated config.
    case 'update_external_market_config': {
      try {
        const newConfig: any = {};
        
        if (typeof args.apiUrl === 'string') {
          newConfig.apiUrl = args.apiUrl;
        }
        
        if (typeof args.apiKey === 'string') {
          newConfig.apiKey = args.apiKey;
        }
        
        if (typeof args.symbols === 'object' && args.symbols !== null) {
          newConfig.symbols = {} as { EDU: string; USD: string };
          
          if (typeof (args.symbols as any).EDU === 'string') {
            newConfig.symbols.EDU = (args.symbols as any).EDU;
          }
          
          if (typeof (args.symbols as any).USD === 'string') {
            newConfig.symbols.USD = (args.symbols as any).USD;
          }
        }
        
        external_market.updateConfig(newConfig);
        const currentConfig = external_market.getConfig();
        
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                success: true,
                message: 'External market API configuration updated',
                config: currentConfig
              }, null, 2),
            },
          ],
        };
      } catch (error) {
        console.error('Error updating external market config:', error);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({ 
                error: 'Failed to update external market API configuration',
                message: (error as Error).message
              }, null, 2),
            },
          ],
          isError: true,
        };
      }
    }
  • Core helper function updateConfig that merges new configuration into the global config and persists it to config/external_market_config.json file.
    export function updateConfig(newConfig: Partial<typeof config>): void {
      config = { ...config, ...newConfig };
      
      // Save updated config to file
      try {
        const configDir = path.join(__dirname, '..', 'config');
        if (!fs.existsSync(configDir)) {
          fs.mkdirSync(configDir, { recursive: true });
        }
        fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
      } catch (error) {
        console.error('Error saving external market config:', error);
      }
    }
  • Input schema for update_external_market_config tool defining properties apiUrl, apiKey, and symbols object.
    inputSchema: {
      type: 'object',
      properties: {
        apiUrl: {
          type: 'string',
          description: 'API URL for external market data',
        },
        apiKey: {
          type: 'string',
          description: 'API key for external market data (if required)',
        },
        symbols: {
          type: 'object',
          properties: {
            EDU: {
              type: 'string',
              description: 'Symbol for EDU token on the external API',
            },
            USD: {
              type: 'string',
              description: 'Symbol for USD on the external API',
            },
          },
          description: 'Symbol mappings for the external API',
        },
      },
      required: [],
    },
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. While 'Update' implies a mutation operation, the description doesn't disclose whether this requires special permissions, whether changes are persistent or reversible, what happens to existing configuration values not mentioned, or any rate limits/constraints. For a configuration mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 that states the core purpose without unnecessary words. It's appropriately sized for a configuration update tool and front-loads the essential information. Every word earns its place with zero waste or 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?

For a configuration mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't address permission requirements, side effects, error conditions, or what happens to existing configuration. The agent lacks crucial context about how this tool behaves and what to expect when using it, especially given it modifies system settings.

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 schema has 100% description coverage, so all parameters are documented in the structured schema. The description adds no additional parameter semantics beyond what's already in the schema descriptions. It doesn't explain relationships between parameters, provide examples, or clarify that 'symbols' contains specific token mappings. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('Update') and target resource ('configuration for external market data API'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its sibling 'set_rpc_url' which also updates configurations, nor does it mention what specific aspects of the configuration are updated beyond the API parameters.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (like needing admin permissions), when this should be called versus using 'get_external_market_config' first, or how it relates to other configuration tools like 'set_rpc_url'. The agent receives no usage context beyond the basic purpose.

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

Related 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/SailFish-Finance/educhain-ai-agent-kit'

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