View as Markdown
Mode icon

Mode ACTION

List Spaces

List the spaces (called Collections in the Mode UI) visible to the authenticated user. See the documentation
  • Action
  • Read only
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Mode account once, then configure and run List Spaces from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "mode-list-spaces",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    mode: { authProvisionId: "apn_xxxxxxx" },
    filter: "Filter",
    limit: 10,
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

List Spaces inputs
Property Type Description
filter Filter string
Optional space filter. Example: all to include personal and all accessible spaces.
Optional
limit Limit integer
Maximum number of spaces to return per page (maps to per_page). Must be between 1 and 1000.
Optional
page Page integer
Page of results to return. Providing page (or limit) paginates the response and includes a pagination section with details like the current page and total pages.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
mode-list-spaces
Version
0.0.1
App
Mode
Authentication
API key
Read-only
Yes
Destructive
No
Open world
Yes