Skip to main content
Glama
shlomico-tr

eToro MCP Server

Official
by shlomico-tr

fetch_instrument_details

Retrieve detailed information for specified eToro instruments using the MCP server, enabling efficient access to instrument data for analysis and trading decisions.

Instructions

Fetch details for a list of eToro instruments

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'fetch_instrument_details' tool. It takes instrumentIds and fields, constructs a query to the eToro API, performs a GET request with specific headers to bypass CORS, parses the JSON response, and returns it as formatted text content.
    }, async (params) => {
        const { instrumentIds, fields } = params;
        try {
            const instrumentIdsString = instrumentIds.join(',');
            const fieldsString = fields.join(',');
            // This should be run server-side due to CORS limitations
            const response = await fetch(`https://www.etoro.com/sapi/instrumentsinfo/Instruments?internalInstrumentId=${instrumentIdsString}&fields=${fieldsString}`, {
                method: 'GET',
                headers: {
                    'accept': 'application/json, text/plain, */*',
                    'accept-language': 'en-US,en;q=0.9',
                    'cache-control': 'no-cache',
                    'pragma': 'no-cache',
                    'priority': 'u=1, i',
                    'sec-ch-ua': '"Not(A:Brand";v="99", "Google Chrome";v="133", "Chromium";v="133"',
                    'sec-ch-ua-mobile': '?0',
                    'sec-ch-ua-platform': '"Windows"',
                    'sec-fetch-dest': 'empty',
                    'sec-fetch-mode': 'cors',
                    'sec-fetch-site': 'same-origin',
                    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36',
                }
            });
            if (!response.ok) {
                throw new Error(`Failed to fetch instrument details: ${response.statusText}`);
            }
            const instrumentData = await response.json();
            return {
                content: [{
                        type: "text",
                        text: JSON.stringify(instrumentData, null, 2)
                    }],
            };
        }
        catch (error) {
            if (error instanceof Error) {
                throw new Error(`Failed to fetch instrument details: ${error.message}`);
            }
            throw error;
        }
    });
  • Zod schema defining the input parameters for the tool: an array of instrument IDs (required) and an array of fields (optional with default).
    instrumentIds: z.array(z.number()).describe("List of instrument IDs to fetch details for"),
    fields: z.array(z.string())
        .default(['displayname', 'threeMonthPriceChange', 'oneYearPriceChange', 'lastYearPriceChange'])
        .describe("Fields to include in the response")
  • dist/index.js:136-136 (registration)
    The registration of the 'fetch_instrument_details' tool on the MCP server using server.tool(name, description, schema, handler).
    server.tool("fetch_instrument_details", "Fetch details for a list of eToro instruments", {
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 mentions fetching details but fails to explain how the list is determined, if authentication is needed, rate limits, or response format, leaving significant gaps for a tool with zero parameters.

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 no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly.

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 lack of annotations and output schema, the description is incomplete. It doesn't explain what 'details' include, how instruments are selected, or the return format, making it inadequate for a tool that presumably returns data.

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, and schema description coverage is 100%, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, earning a high baseline score for this context.

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 ('fetch details') and resource ('eToro instruments'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'search_instruments' or specify what 'details' include, preventing 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 like 'search_instruments' or 'fetch_etoro_portfolio'. The description lacks context about prerequisites or scenarios for usage, offering minimal practical 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

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/shlomico-tr/etoroPortfolioMCP'

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