Skip to main content
Glama
BACH-AI-Tools

Finmap MCP Server

List tickers by sector

list_tickers

Retrieve company tickers and names for specific stock exchanges on given dates, organized by sector to support financial analysis and market research.

Instructions

Return company tickers and names for an exchange on a specific date, grouped by sector.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stockExchangeYesStock exchange: amex, nasdaq, nyse, us-all, lse, moex, bist, hkex
yearNo
monthNo
dayNo
sectorNoFilter by specific sector
englishNamesNoUse English names if available

Implementation Reference

  • The main handler function for the 'list_tickers' tool. It fetches market data for the specified exchange and date, filters by optional sector, groups companies by sector with their tickers and names (English or original), sorts tickers alphabetically within each sector, and returns a formatted JSON response.
    async ({
    	stockExchange,
    	year,
    	month,
    	day,
    	sector,
    	englishNames,
    }: {
    	stockExchange: StockExchange;
    	year?: number;
    	month?: number;
    	day?: number;
    	sector?: string;
    	englishNames?: boolean;
    }) => {
    	try {
    		const formattedDate = getDate(year, month, day);
    		const marketDataResponse = await fetchMarketData(
    			stockExchange,
    			formattedDate,
    		);
    
    		const sectorGroups: Record<
    			string,
    			Array<{ ticker: string; name: string }>
    		> = {};
    
    		marketDataResponse.securities.data.forEach((item: any[]) => {
    			if (
    				item[INDICES.TYPE] !== "sector" &&
    				item[INDICES.SECTOR] &&
    				(!sector || item[INDICES.SECTOR] === sector)
    			) {
    				const sectorName = item[INDICES.SECTOR];
    				const ticker = item[INDICES.TICKER];
    				const name = englishNames
    					? item[INDICES.NAME_ENG]
    					: item[INDICES.NAME_ORIGINAL_SHORT] || item[INDICES.NAME_ENG];
    
    				if (ticker && name) {
    					if (!sectorGroups[sectorName]) sectorGroups[sectorName] = [];
    					sectorGroups[sectorName].push({ ticker, name });
    				}
    			}
    		});
    
    		Object.values(sectorGroups).forEach((companies) => {
    			companies.sort((a, b) => a.ticker.localeCompare(b.ticker));
    		});
    
    		return createResponse({
    			info: INFO,
    			date: formattedDate,
    			exchange: stockExchange.toUpperCase(),
    			currency: EXCHANGE_INFO[stockExchange as StockExchange].currency,
    			sectors: sectorGroups,
    		});
    	} catch (error) {
    		return createErrorResponse(error);
    	}
    },
  • The schema definition for the 'list_tickers' tool, including title, description, and Zod-based input schema for parameters like stockExchange, date components, optional sector filter, and englishNames flag.
    {
    	title: "List tickers by sector",
    	description:
    		"Return company tickers and names for an exchange on a specific date, grouped by sector.",
    	inputSchema: {
    		stockExchange: exchangeSchema,
    		...dateSchema,
    		sector: z.string().optional().describe("Filter by specific sector"),
    		englishNames: z
    			.boolean()
    			.default(true)
    			.describe("Use English names if available"),
    	},
    },
  • src/core.ts:326-403 (registration)
    The direct registration of the 'list_tickers' tool via server.registerTool within the registerFinmapTools function.
    server.registerTool(
    	"list_tickers",
    	{
    		title: "List tickers by sector",
    		description:
    			"Return company tickers and names for an exchange on a specific date, grouped by sector.",
    		inputSchema: {
    			stockExchange: exchangeSchema,
    			...dateSchema,
    			sector: z.string().optional().describe("Filter by specific sector"),
    			englishNames: z
    				.boolean()
    				.default(true)
    				.describe("Use English names if available"),
    		},
    	},
    	async ({
    		stockExchange,
    		year,
    		month,
    		day,
    		sector,
    		englishNames,
    	}: {
    		stockExchange: StockExchange;
    		year?: number;
    		month?: number;
    		day?: number;
    		sector?: string;
    		englishNames?: boolean;
    	}) => {
    		try {
    			const formattedDate = getDate(year, month, day);
    			const marketDataResponse = await fetchMarketData(
    				stockExchange,
    				formattedDate,
    			);
    
    			const sectorGroups: Record<
    				string,
    				Array<{ ticker: string; name: string }>
    			> = {};
    
    			marketDataResponse.securities.data.forEach((item: any[]) => {
    				if (
    					item[INDICES.TYPE] !== "sector" &&
    					item[INDICES.SECTOR] &&
    					(!sector || item[INDICES.SECTOR] === sector)
    				) {
    					const sectorName = item[INDICES.SECTOR];
    					const ticker = item[INDICES.TICKER];
    					const name = englishNames
    						? item[INDICES.NAME_ENG]
    						: item[INDICES.NAME_ORIGINAL_SHORT] || item[INDICES.NAME_ENG];
    
    					if (ticker && name) {
    						if (!sectorGroups[sectorName]) sectorGroups[sectorName] = [];
    						sectorGroups[sectorName].push({ ticker, name });
    					}
    				}
    			});
    
    			Object.values(sectorGroups).forEach((companies) => {
    				companies.sort((a, b) => a.ticker.localeCompare(b.ticker));
    			});
    
    			return createResponse({
    				info: INFO,
    				date: formattedDate,
    				exchange: stockExchange.toUpperCase(),
    				currency: EXCHANGE_INFO[stockExchange as StockExchange].currency,
    				sectors: sectorGroups,
    			});
    		} catch (error) {
    			return createErrorResponse(error);
    		}
    	},
    );
  • src/index.ts:12-12 (registration)
    Invocation of registerFinmapTools in the FinmapMcpServer class init method, which registers all tools including list_tickers.
    registerFinmapTools(this.server);
  • Invocation of registerFinmapTools on the MCP server for stdio transport, registering the list_tickers tool.
    registerFinmapTools(server);
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 returns data but doesn't describe output format, pagination, rate limits, authentication needs, or error handling. For a read operation with 6 parameters, this leaves significant gaps in understanding how the tool behaves beyond basic functionality.

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, well-structured sentence that efficiently conveys the core functionality without unnecessary words. It's front-loaded with the main action and key parameters, making it easy to parse. Every element earns its place.

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 6 parameters, no annotations, and no output schema, the description is incomplete. It doesn't address return values, error cases, or practical usage details needed for effective tool invocation. For a data retrieval tool with multiple filters, more context is required to understand limitations and expected behavior.

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?

Schema description coverage is 50%, with 3 of 6 parameters having descriptions. The description adds minimal value beyond the schema—it mentions 'exchange', 'specific date', and 'sector' grouping, which aligns with parameters but doesn't explain semantics like date validation, sector filtering logic, or the 'englishNames' default behavior. It partially compensates for the coverage gap but not sufficiently.

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 ('return'), resource ('company tickers and names'), and key constraints ('for an exchange on a specific date, grouped by sector'). It distinguishes from siblings like 'list_exchanges' (which lists exchanges) and 'list_sectors' (which lists sectors), but doesn't explicitly differentiate from 'search_companies' or 'get_company_profile'. The purpose is specific but could better highlight uniqueness.

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 like 'search_companies' or 'list_sectors'. It mentions grouping by sector but doesn't specify if this is the primary use case or how it compares to other data retrieval tools. Usage context is implied by the parameters but not explicitly stated.

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