Skip to main content
Glama

obtener_configuracion_chamber

Retrieve Chamber contract configuration details including address, network, and supported tokens for MIST.cash privacy-preserving payments on Starknet.

Instructions

Get Chamber contract configuration including contract address, network, and supported tokens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
networkNoStarknet networkmainnet

Implementation Reference

  • The main asynchronous handler function for the 'obtener_configuracion_chamber' tool. Validates input, determines contract address based on network, and returns configuration including supported tokens.
    export async function obtenerConfiguracionChamber(params) { // Validate parameters const validated = ObtenerConfiguracionChamberSchema.parse(params); try { const contractAddress = validated.network === 'mainnet' ? CHAMBER_ADDR_MAINNET : CHAMBER_ADDR_SEPOLIA; const config = { contract_address: contractAddress, network: validated.network, supported_tokens: SUPPORTED_TOKENS[validated.network] }; return { success: true, config, token_info: { ETH: 'Native Starknet token', USDC: 'USD Coin stablecoin', USDT: 'Tether stablecoin', DAI: 'DAI stablecoin' } }; } catch (error) { throw new Error(`Failed to get Chamber configuration: ${error.message}`); } }
  • Zod schema used for input validation in the handler, defining the 'network' parameter as 'mainnet' or 'sepolia'.
    export const ObtenerConfiguracionChamberSchema = z.object({ network: NetworkSchema });
  • src/index.js:127-141 (registration)
    Tool registration in the MCP ListToolsRequestHandler, specifying the tool name, description, and input schema.
    { name: 'obtener_configuracion_chamber', description: 'Get Chamber contract configuration including contract address, network, and supported tokens.', inputSchema: { type: 'object', properties: { network: { type: 'string', enum: ['mainnet', 'sepolia'], description: 'Starknet network', default: 'mainnet', }, }, }, },
  • src/index.js:186-194 (registration)
    Dispatch logic in the MCP CallToolRequestHandler switch statement that invokes the tool handler function.
    case 'obtener_configuracion_chamber': return { content: [ { type: 'text', text: JSON.stringify(await obtenerConfiguracionChamber(args || {}), null, 2), }, ], };
  • src/index.js:14-14 (registration)
    Import statement that brings the tool handler into the main server file.
    import { obtenerConfiguracionChamber } from './tools/obtener-configuracion.js';

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/joadataarg/Mcp-mistcash'

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