Skip to main content
Glama

get-accounts

Retrieve all Autodesk Construction Cloud accounts available through the APS MCP Server to manage project access and permissions.

Instructions

List all available Autodesk Construction Cloud accounts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get-accounts' tool. It authenticates using getAccessToken, fetches hubs (accounts) via DataManagementClient, and returns formatted account info.
    export const getAccounts: Tool<typeof schema> = { title: "get-accounts", description: "List all available Autodesk Construction Cloud accounts", schema, callback: async () => { const accessToken = await getAccessToken(["data:read"]); const dataManagementClient = new DataManagementClient(); const hubs = await dataManagementClient.getHubs({ accessToken }); if (!hubs.data) { throw new Error("No accounts found"); } return { content: hubs.data.map((hub) => ({ type: "text", text: JSON.stringify({ id: hub.id, name: hub.attributes?.name }) })) }; } };
  • src/server.ts:12-14 (registration)
    Generic registration loop that registers all tools exported from './tools/index.js', including 'get-accounts', with the MCP server.
    for (const tool of Object.values(tools)) { server.tool(tool.title, tool.description, tool.schema, tool.callback); }
  • src/tools/index.ts:1-1 (registration)
    Barrel export re-exporting the getAccounts tool from its implementation file for convenient import in server.ts.
    export { getAccounts } from "./get-accounts.js";
  • Empty input schema definition for the 'get-accounts' tool (no parameters required).
    const schema = {};

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/petrbroz/aps-mcp-server'

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