get_provider
Retrieve provider details by ID from the UseGrant MCP Server to efficiently manage and access provider information in the platform.
Instructions
Get a provider by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The ID of the provider |
Implementation Reference
- src/index.ts:49-54 (handler)Handler function for the 'get_provider' tool. It takes an 'id' parameter, fetches the provider using usegrant.getProvider(id), and returns the provider data as JSON-formatted text content.async ({ id }) => { const provider = await usegrant.getProvider(id); return { content: [{ type: 'text', text: JSON.stringify(provider, null, 2) }], }; },
- src/index.ts:48-48 (schema)Input schema for the 'get_provider' tool, requiring an 'id' field validated by UgSchema.ProviderIdSchema.{ id: UgSchema.ProviderIdSchema },
- src/index.ts:45-55 (registration)Registration of the 'get_provider' MCP tool using server.tool(), including name, description, schema, and handler function.server.tool( 'get_provider', 'Get a provider by ID', { id: UgSchema.ProviderIdSchema }, async ({ id }) => { const provider = await usegrant.getProvider(id); return { content: [{ type: 'text', text: JSON.stringify(provider, null, 2) }], }; }, );