Skip to main content
Glama

MCP Avantage

by MissionSquad

forex_weekly

Retrieve weekly forex time series data for specific currency pairs. Specify input and output currencies, and choose response format as JSON or CSV.

Instructions

Fetches weekly time series data for a Forex pair.

Input Schema

NameRequiredDescriptionDefault
datatypeNoData format for the response.json
from_symbolYesThe currency symbol to convert from (e.g., "EUR").
to_symbolYesThe currency symbol to convert to (e.g., "USD").

Input Schema (JSON Schema)

{ "additionalProperties": false, "description": "Parameters for fetching weekly/monthly Forex time series data.", "properties": { "datatype": { "default": "json", "description": "Data format for the response.", "enum": [ "json", "csv" ], "type": "string" }, "from_symbol": { "description": "The currency symbol to convert from (e.g., \"EUR\").", "type": "string" }, "to_symbol": { "description": "The currency symbol to convert to (e.g., \"USD\").", "type": "string" } }, "required": [ "from_symbol", "to_symbol" ], "type": "object" }

Implementation Reference

  • src/index.ts:749-760 (registration)
    Registers the 'forex_weekly' MCP tool with name, description, input schema reference, and inline execute handler that calls Alpha Vantage's forex.weekly API via the shared executeAvantageTool helper.
    server.addTool({ name: "forex_weekly", description: "Fetches weekly time series data for a Forex pair.", parameters: schemas.ForexWeeklyMonthlyParamsSchema, execute: ( args, context // Let type be inferred ) => executeAvantageTool("forex_weekly", args, context, (av, params) => av.forex.weekly(params) ), });
  • Zod validation schema for input parameters to the forex_weekly tool (shared with forex_monthly): from_symbol, to_symbol, and optional datatype.
    export const ForexWeeklyMonthlyParamsSchema = z.object({ from_symbol: z.string().describe('The currency symbol to convert from (e.g., "EUR").'), to_symbol: z.string().describe('The currency symbol to convert to (e.g., "USD").'), datatype: DatatypeSchema.default('json').optional(), }).describe('Parameters for fetching weekly/monthly Forex time series data.')
  • Inline handler function for forex_weekly tool execution, which invokes the Alpha Vantage forex.weekly endpoint using the executeAvantageTool wrapper.
    execute: ( args, context // Let type be inferred ) => executeAvantageTool("forex_weekly", args, context, (av, params) => av.forex.weekly(params) ), });

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/MissionSquad/mcp-avantage'

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