ListServiceBindingTypes
Retrieve available service binding types (ODataV2, ODataV4) from the ADT Business Services endpoint.
Instructions
List available service binding types (for example ODataV2/ODataV4) from ADT Business Services endpoint.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| response_format | No | xml |
Implementation Reference
- Main handler function that executes the 'ListServiceBindingTypes' tool logic. Creates an ADT client, calls getServiceBindingTypes(), and returns parsed response.
export async function handleListServiceBindingTypes( context: HandlerContext, args: ListServiceBindingTypesArgs = {}, ) { const { connection, logger } = context; try { const responseFormat = args.response_format ?? 'xml'; const client = createAdtClient(connection, logger); const response = await client.getServiceBinding().getServiceBindingTypes(); return return_response({ data: JSON.stringify( { success: true, response_format: responseFormat, status: response.status, payload: parseServiceBindingPayload(response.data, responseFormat), }, null, 2, ), status: response.status, statusText: response.statusText, headers: response.headers, config: response.config, }); } catch (error: any) { logger?.error('Error listing service binding types:', error); return return_error(error); } } - Tool definition including name 'ListServiceBindingTypes', availability, description, and input schema with optional response_format parameter (xml/json/plain).
export const TOOL_DEFINITION = { name: 'ListServiceBindingTypes', available_in: ['onprem', 'cloud'] as const, description: 'List available service binding types (for example ODataV2/ODataV4) from ADT Business Services endpoint.', inputSchema: { type: 'object', properties: { response_format: { type: 'string', enum: ['xml', 'json', 'plain'], default: 'xml', }, }, }, } as const; - TypeScript interface for the handler arguments, accepting optional response_format.
interface ListServiceBindingTypesArgs { response_format?: ServiceBindingResponseFormat; } - src/lib/handlers/groups/HighLevelHandlersGroup.ts:312-315 (registration)Import of the tool definition (aliased as ListServiceBindingTypes_Tool) and handler function into the HighLevelHandlersGroup.
import { handleListServiceBindingTypes, TOOL_DEFINITION as ListServiceBindingTypes_Tool, } from '../../../handlers/service_binding/high/handleListServiceBindingTypes'; - src/lib/handlers/groups/HighLevelHandlersGroup.ts:741-744 (registration)Registration of the tool in the high-level handlers group, mapping ListServiceBindingTypes_Tool to handleListServiceBindingTypes with context.
{ toolDefinition: ListServiceBindingTypes_Tool, handler: withContext(handleListServiceBindingTypes), },