View as Markdown
Moodle icon

Moodle ACTION

Get a Course by Field

Retrieves courses that match a specific field such as ID, short name, ID number, category, or section ID. See the documentation
  • Action
  • Read only
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Moodle account once, then configure and run Get a Course by Field 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-get-course-by-field",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    moodle: { authProvisionId: "apn_xxxxxxx" },
    field: "Field",
    value: "Value",
  },
})

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.

Get a Course by Field inputs
Property Type Description
field Field string
The course field to search by. Use id for one course ID, ids for comma-separated course IDs like 12,34,56, shortname for a course short name like BIO101, idnumber for an external course ID number, category for a category ID like 7, or sectionid for a Moodle course section ID.
Required
value Value string
The value to match against the selected field. Examples: 42 for id, 42,43 for ids, BIO101 for shortname, or 7 for category.
Required

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-get-course-by-field
Version
0.0.2
App
Moodle
Authentication
API key
Read-only
Yes
Destructive
No
Open world
Yes