Skip to main content
Glama

fetch-accounts

Retrieve account data from Dynamics 365 to access customer information and manage business relationships.

Instructions

Fetch accounts from Dynamics 365

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The inline handler function registered for the 'fetch-accounts' tool. It calls d365.getAccounts(), formats the accounts as JSON, and returns as text content or an error response.
    async () => { try { const response = await d365.getAccounts(); const accounts = JSON.stringify(response.value, null, 2); return { content: [ { type: "text", text: accounts, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error: ${ error instanceof Error ? error.message : "Unknown error" }, please check your credentials and try again.`, }, ], isError: true, }; } }
  • src/tools.ts:39-42 (registration)
    Registration of the 'fetch-accounts' tool with the MCP server, specifying name, description, and empty input schema.
    server.tool( "fetch-accounts", "Fetch accounts from Dynamics 365", {},
  • Helper method in Dynamics365 class that performs the API request to fetch all accounts from Dynamics 365 Web API endpoint.
    public async getAccounts(): Promise<any> { return this.makeApiRequest("api/data/v9.2/accounts", "GET"); }

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/srikanth-paladugula/mcp-dynamics365-server'

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