Skip to main content
Glama
agentreloadconfig.ts1.36 kB
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import type { WithId } from '@medplum/core'; import type { FhirRequest, FhirResponse } from '@medplum/fhir-router'; import type { Agent, OperationDefinition } from '@medplum/fhirtypes'; import { handleBulkAgentOperation, sendAndHandleAgentRequest } from './utils/agentutils'; export const operation: OperationDefinition = { resourceType: 'OperationDefinition', name: 'agent-reload-config', status: 'active', kind: 'operation', code: 'reload-config', experimental: true, resource: ['Agent'], system: false, type: true, instance: true, parameter: [{ use: 'out', name: 'return', type: 'Bundle', min: 1, max: '1' }], }; /** * Handles HTTP requests for the Agent $reload-config operation. * * Endpoints: * [fhir base]/Agent/$reload-config * [fhir base]/Agent/[id]/$reload-config * * @param req - The FHIR request. * @returns The FHIR response. */ export async function agentReloadConfigHandler(req: FhirRequest): Promise<FhirResponse> { return handleBulkAgentOperation(req, async (agent) => reloadConfig(agent)); } async function reloadConfig(agent: WithId<Agent>): Promise<FhirResponse> { return sendAndHandleAgentRequest(agent, { type: 'agent:reloadconfig:request' }, 'agent:reloadconfig:response'); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/medplum/medplum'

If you have feedback or need assistance with the MCP directory API, please join our Discord server