Using MCP Tools Exposed by the MCP Server

The MCP server registers tools according to the configured MODE. The tools for read mode are always available. Compile-only tools are available only in compile mode. Staging and bulk-save tools are available only in write mode.

MCP Tools - Read Mode

In read mode, PeopleCode retrieval tools return PeopleCode source directly. In compile or write mode, when PeopleCode is found, the tools save a copy to output_dir, WORKSPACE_DIR, or the current working directory and return the saved file path.

The following tools are available in the read mode to retrieve PeopleTools metadata or PeopleCode.

API Description

get_field_details

Retrieves metadata for the specified Field definition.

get_record_details

Retrieves metadata for the specified Record definition.

get_page_details

Retrieves metadata for the specified Page definition.

get_component_details

Retrieves metadata for the specified Component definition.

get_application_package_details

Retrieves the specified Application Package definition and its associated class structure.

get_app_engine_details

Retrieves the specified Application Engine definition and program structure.

get_project_details

Retrieves the definitions that belong to the specified Project.

get_record_peoplecode

Retrieves PeopleCode for the specified Record and event.

get_page_peoplecode

Retrieves PeopleCode for the specified Page and event.

get_page_field_peoplecode

Retrieves PeopleCode for the specified Page field and event.

get_component_peoplecode

Retrieves PeopleCode for the specified Component and event.

get_component_record_peoplecode

Retrieves PeopleCode for the specified Component record and event.

get_component_record_field_peoplecode

Retrieves PeopleCode for the specified Component record field and event.

get_application_class_peoplecode

Retrieves PeopleCode for the specified Application Class.

get_app_engine_peoplecode

Retrieves PeopleCode for the specified Application Engine program, section, step, and action.

MCP Tools - Compile Mode

In the compile mode, each tool reads PeopleCode from a file and calls Compile PeopleCode API. The tools compile the PeopleCode for validation and do not save it to the database.

In addition to the tools available in the read mode, the compile mode adds the following tools.
API Description

compile_record_peoplecode

Compiles Record PeopleCode from the supplied file without saving.

compile_page_peoplecode

Compiles Page PeopleCode from the supplied file without saving.

compile_page_field_peoplecode

Compiles Page field PeopleCode from the supplied file without saving.

compile_component_peoplecode

Compiles Component PeopleCode from the supplied file without saving.

compile_component_record_peoplecode

Compiles Component record PeopleCode from the supplied file without saving.

compile_component_record_field_peoplecode

Compiles Component record field PeopleCode from the supplied file without saving.

compile_application_class_peoplecode

Compiles Application Class PeopleCode from the supplied file without saving.

compile_app_engine_peoplecode

Compiles Application Engine PeopleCode from the supplied file without saving.

MCP Tools - Write Mode

The write mode adds a two-phase update flow. The stage tools read PeopleCode from a file and add it to an in-memory staging queue. Staging does not update the database. The client can review or clear the queue before calling the save_all_peoplecode tool to compile and save all staged peoplecode.

The write mode adds the following tools:
API Description

stage_record_peoplecode

Stages Record PeopleCode from the supplied file.

stage_page_peoplecode

Stages Page PeopleCode from the supplied file.

stage_page_field_peoplecode

Stages Page field PeopleCode from the supplied file.

stage_component_peoplecode

Stages Component PeopleCode from the supplied file.

stage_component_record_peoplecode

Stages Component record PeopleCode from the supplied file.

stage_component_record_field_peoplecode

Stages Component record field PeopleCode from the supplied file.

stage_application_class_peoplecode

Stages Application Class PeopleCode from the supplied file.

stage_app_engine_peoplecode

Stages Application Engine PeopleCode from the supplied file.

list_staged_peoplecode

Lists the PeopleCode objects currently in the staging queue.

clear_staged_peoplecode

Clears the staging queue without updating the database.

save_all_peoplecode

Compiles and saves all staged changes and clears the queue after a successful save.