Skip to main content
Glama
BACH-AI-Tools

Finmap MCP Server

List exchanges

list_exchanges

Retrieve supported stock exchanges with IDs, names, country, currency, earliest available dates, and update frequencies for accessing historical market data.

Instructions

Return supported exchanges with IDs, names, country, currency, earliest available date, and update frequency.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_exchanges' tool. It maps over the EXCHANGE_INFO object to create a list of exchanges with their details (id, name, country, currency, availableSince, updateFrequency) and returns a formatted response using createResponse, including provider info.
    async () => {
    	try {
    		const exchanges = Object.entries(EXCHANGE_INFO).map(([id, info]) => ({
    			id,
    			...info,
    		}));
    		return createResponse({ info: INFO, exchanges });
    	} catch (error) {
    		return createErrorResponse(error);
    	}
    },
  • The input/output schema for the 'list_exchanges' tool, defining the title, description, and an empty inputSchema since no parameters are required.
    {
    	title: "List exchanges",
    	description:
    		"Return supported exchanges with IDs, names, country, currency, earliest available date, and update frequency.",
    	inputSchema: {},
    },
  • src/core.ts:254-273 (registration)
    The registration of the 'list_exchanges' tool within the registerFinmapTools function using server.registerTool, including the schema and handler inline.
    server.registerTool(
    	"list_exchanges",
    	{
    		title: "List exchanges",
    		description:
    			"Return supported exchanges with IDs, names, country, currency, earliest available date, and update frequency.",
    		inputSchema: {},
    	},
    	async () => {
    		try {
    			const exchanges = Object.entries(EXCHANGE_INFO).map(([id, info]) => ({
    				id,
    				...info,
    			}));
    			return createResponse({ info: INFO, exchanges });
    		} catch (error) {
    			return createErrorResponse(error);
    		}
    	},
    );
  • The EXCHANGE_INFO constant providing detailed information for each supported stock exchange, directly used in the list_exchanges handler to generate the response.
    const EXCHANGE_INFO: Record<
    	StockExchange,
    	{
    		name: string;
    		country: string;
    		currency: string;
    		availableSince: string;
    		updateFrequency: string;
    	}
    > = {
    	amex: {
    		name: "American Stock Exchange",
    		country: "United States",
    		currency: "USD",
    		availableSince: "2024-12-09",
    		updateFrequency: "Daily",
    	},
    	nasdaq: {
    		name: "NASDAQ Stock Market",
    		country: "United States",
    		currency: "USD",
    		availableSince: "2024-12-09",
    		updateFrequency: "Daily",
    	},
    	nyse: {
    		name: "New York Stock Exchange",
    		country: "United States",
    		currency: "USD",
    		availableSince: "2024-12-09",
    		updateFrequency: "Daily",
    	},
    	"us-all": {
    		name: "US Combined (AMEX + NASDAQ + NYSE)",
    		country: "United States",
    		currency: "USD",
    		availableSince: "2024-12-09",
    		updateFrequency: "Daily",
    	},
    	lse: {
    		name: "London Stock Exchange",
    		country: "United Kingdom",
    		currency: "GBP",
    		availableSince: "2025-02-07",
    		updateFrequency: "Hourly (weekdays)",
    	},
    	moex: {
    		name: "Moscow Exchange",
    		country: "Russia",
    		currency: "RUB",
    		availableSince: "2011-12-19",
    		updateFrequency: "Every 15 minutes (weekdays)",
    	},
    	bist: {
    		name: "Borsa Istanbul",
    		country: "Turkey",
    		currency: "TRY",
    		availableSince: "2015-11-30",
    		updateFrequency: "Every two months",
    	},
    	hkex: {
    		name: "Hong Kong Stock Exchange",
    		country: "Hong Kong",
    		currency: "HKD",
    		availableSince: "2025-09-29",
    		updateFrequency: "Every 30 minutes (weekdays)",
    	},
    };
  • The createResponse helper function used by the list_exchanges handler to format the output as MCP content with JSON-stringified data.
    function createResponse(data: any) {
    	return {
    		content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }],
    	};
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states what data is returned but doesn't mention if this is a read-only operation, potential rate limits, authentication needs, data freshness, or pagination behavior. For a tool with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves beyond basic output.

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 front-loads the core action ('Return supported exchanges') followed by specific data fields. Every word earns its place with no redundancy or unnecessary elaboration.

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

Completeness3/5

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

Given the tool has 0 parameters, no annotations, and no output schema, the description provides adequate basic information about what the tool returns. However, it doesn't address behavioral aspects like whether this is a static list or dynamically updated, or how the data is structured. For a simple list tool with minimal complexity, this is minimally viable but could be more complete.

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 0 parameters with 100% schema description coverage, so the baseline is 4. The description appropriately doesn't waste space discussing non-existent parameters and focuses on what the tool returns instead.

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 ('Return') and resource ('supported exchanges') along with specific data fields returned (IDs, names, country, currency, earliest available date, update frequency). It distinguishes from siblings like list_sectors or list_tickers by specifying it's about exchanges rather than sectors or tickers. However, it doesn't explicitly differentiate from other exchange-related tools (none exist in siblings), so it's not a perfect 5.

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, context, or compare to sibling tools like get_market_overview or search_companies. The agent must infer usage from the tool name and description alone without explicit direction.

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/BACH-AI-Tools/bach-finmap-mcp'

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