LDAP Account Manager

MCP

Table of Contents

MCP_VERSION  = '2026-07-28'
validateRequestFormat()  : void
Checks if the request format is valid.
validateJsonData()  : void
Checks if the JSON data is valid.
badMcpRequest()  : void
Sends an error to the client and ends processing.
sendDefaultHeaders()  : void
Sends default JSON headers.
getResponseTemplate()  : array<string, string|int>
Returns the basic response data structure.
routeRequest()  : void
Routes the request to the right handler.
answerDiscovery()  : void
Answers to the discovery call.
answerToolList()  : void
Answers to the tool listing call.
getToolList()  : array<string, string|array>>
Returns a list of available tools.
answerToolCall()  : void
Answers to a tool call.
listWhitePagesProfiles()  : void
Lists the white pages profiles.
getValidWhitePagesProfileNames()  : array<string|int, string>
Returns a list of all valid profile names.
listWhitePagesProfileSections()  : void
Lists the sections of a given white pages profile.
getWhitePagesProfileSectionEntries()  : void
Lists the entries of a section of a given white pages profile.
getWhitePagesProfileSectionEntryDetails()  : void
Returns the details of an entry of a section of a given white pages profile.
initLdapConnection()  : void
Opens the LDAP connection.

Constants

MCP_VERSION

public mixed MCP_VERSION = '2026-07-28'

Functions

validateRequestFormat()

Checks if the request format is valid.

validateRequestFormat() : void
Return values
void —

validateJsonData()

Checks if the JSON data is valid.

validateJsonData(array<string, string|array>> $jsonData) : void
Parameters
$jsonData : array<string, string|array>>

data

Return values
void —

badMcpRequest()

Sends an error to the client and ends processing.

badMcpRequest(string|int $id, int $code, string $message) : void
Parameters
$id : string|int

request id

$code : int

error code

$message : string

error message

Return values
void —

sendDefaultHeaders()

Sends default JSON headers.

sendDefaultHeaders() : void
Return values
void —

getResponseTemplate()

Returns the basic response data structure.

getResponseTemplate(string|int $id) : array<string, string|int>
Parameters
$id : string|int

request id

Return values
array<string, string|int> —

response template

routeRequest()

Routes the request to the right handler.

routeRequest(array<string, string|array>> $jsonData) : void
Parameters
$jsonData : array<string, string|array>>

data

Return values
void —

answerDiscovery()

Answers to the discovery call.

answerDiscovery(string|int $id) : void
Parameters
$id : string|int

request id

Return values
void —

answerToolList()

Answers to the tool listing call.

answerToolList(string|int $id) : void
Parameters
$id : string|int

request id

Return values
void —

getToolList()

Returns a list of available tools.

getToolList() : array<string, string|array>>
Return values
array<string, string|array>> —

tools

answerToolCall()

Answers to a tool call.

answerToolCall(string|int $id, array<string, string|array> $params) : void
Parameters
$id : string|int

request id

$params : array<string, string|array>

parameters

Return values
void —

listWhitePagesProfiles()

Lists the white pages profiles.

listWhitePagesProfiles(int|string $id) : void
Parameters
$id : int|string

request ID

Return values
void —

getValidWhitePagesProfileNames()

Returns a list of all valid profile names.

getValidWhitePagesProfileNames() : array<string|int, string>
Return values
array<string|int, string> —

profile names

listWhitePagesProfileSections()

Lists the sections of a given white pages profile.

listWhitePagesProfileSections(int|string $id, array<string, string|array> $params) : void
Parameters
$id : int|string

request ID

$params : array<string, string|array>

parameters

Return values
void —

getWhitePagesProfileSectionEntries()

Lists the entries of a section of a given white pages profile.

getWhitePagesProfileSectionEntries(int|string $id, array<string, string|array> $params) : void
Parameters
$id : int|string

request ID

$params : array<string, string|array>

parameters

Return values
void —

getWhitePagesProfileSectionEntryDetails()

Returns the details of an entry of a section of a given white pages profile.

getWhitePagesProfileSectionEntryDetails(int|string $id, array<string, string|array> $params) : void
Parameters
$id : int|string

request ID

$params : array<string, string|array>

parameters

Return values
void —

initLdapConnection()

Opens the LDAP connection.

initLdapConnection(int|string $id, WhitePagesProfile $profile) : void
Parameters
$id : int|string

request ID

$profile : WhitePagesProfile

profile

Return values
void —

Search results