asana_list_workspaces
Retrieve all available Asana workspaces to organize projects and tasks across teams. Use optional fields to customize the data returned.
Instructions
List all available workspaces in Asana
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| opt_fields | No | Comma-separated list of optional fields to include |
Implementation Reference
- src/tool-handler.ts:104-109 (handler)Executes the 'asana_list_workspaces' tool by calling the AsanaClientWrapper's listWorkspaces method with the provided arguments and returns the JSON-stringified response.
case "asana_list_workspaces": { const response = await asanaClient.listWorkspaces(args); return { content: [{ type: "text", text: JSON.stringify(response) }], }; } - src/tools/workspace-tools.ts:3-15 (schema)Defines the Tool object with name, description, and input schema allowing optional 'opt_fields' parameter.
export const listWorkspacesTool: Tool = { name: "asana_list_workspaces", description: "List all available workspaces in Asana", inputSchema: { type: "object", properties: { opt_fields: { type: "string", description: "Comma-separated list of optional fields to include" } } } }; - src/asana-client-wrapper.ts:26-29 (helper)Core implementation that calls the Asana SDK's WorkspacesApi.getWorkspaces(opts) and returns the data.
async listWorkspaces(opts: any = {}) { const response = await this.workspaces.getWorkspaces(opts); return response.data; } - src/tool-handler.ts:39-39 (registration)Includes the listWorkspacesTool in the all_tools array for tool registration.
listWorkspacesTool, - src/tool-handler.ts:5-5 (registration)Imports the tool definition for registration.
import { listWorkspacesTool } from './tools/workspace-tools.js';