View as Markdown
Moodle icon

Moodle ACTION

Create a Category

Creates a new course category in Moodle. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Moodle account once, then configure and run Create a Category 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: "moodle-create-category",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    moodle: { authProvisionId: "apn_xxxxxxx" },
    name: "Name",
    parent: "Parent Category",
  },
})

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.

Create a Category inputs
Property Type Description
name Name string
The name of the new category
Required
parent Parent Category string
The ID of the parent category. Leave empty to create a top-level category
Optional Dynamic
idNumber ID Number string
An optional external ID number for the category
Optional
description Description string
A description for the category
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
moodle-create-category
Version
0.0.1
App
Moodle
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes