get-container-sample-data-by-name
Retrieve sample data from a storage container by providing its fully qualified name.
Instructions
Get sample data for a storage container by fully qualified name
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fqn | Yes | Fully qualified container name |
Implementation Reference
- src/index.ts:429-429 (registration)Registration of the 'get-container-sample-data-by-name' tool in the MCP server with its description and schema.
tool("get-container-sample-data-by-name", "Get sample data for a storage container by fully qualified name", getContainerSampleDataByNameSchema.shape, wrapToolHandler(getContainerSampleDataByName)); - src/tools/sample-data.ts:62-64 (handler)Handler function that resolves the container FQN to a UUID, then fetches sample data from the containers API endpoint.
export async function getContainerSampleDataByName(params: z.infer<typeof getContainerSampleDataByNameSchema>) { const entity = await omClient.get<{ id: string }>(`/containers/name/${encodeURIComponent(params.fqn)}`, { fields: "id" }); return omClient.get(`/containers/${entity.id}/sampleData`); - src/tools/sample-data.ts:58-60 (schema)Zod schema for the input: 'fqn' (fully qualified container name as a string).
export const getContainerSampleDataByNameSchema = z.object({ fqn: z.string().describe("Fully qualified container name"), }); - src/index.ts:9-9 (helper)Import of the schema and handler from './tools/sample-data.js'.
import { wrapToolHandler } from "./tools/utils.js";