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
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors
// SPDX-License-Identifier: Apache-2.0
import { sortStringArray } from '@medplum/core';
export function getAvailableTables(resourceTypes: string[]): string[] {
let tables: string[] = [];
for (const resourceType of resourceTypes) {
tables.push(resourceType);
tables.push(resourceType + '_History');
tables.push(resourceType + '_References');
}
tables.push('Address');
tables.push('ContactPoint');
tables.push('HumanName');
tables.push('Coding');
tables.push('Coding_Property');
tables.push('DatabaseMigration');
tables = sortStringArray(tables);
return tables;
}
export function formatValue(val: boolean | string | number | undefined): string | number | undefined {
if (typeof val === 'string') {
return val.length > 50 ? val.substring(0, 50) + '...' : val;
} else if (typeof val === 'boolean') {
// boolean false values aren't rendered by React, so just stringify them
return val.toString().toLocaleUpperCase();
}
return val;
}