create_client
Generate a new client for a provider by specifying client name, provider ID, and audience. Facilitates client management in the UseGrant MCP Server.
Instructions
Create a new client for a provider
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| audience | Yes | The audience of the client | |
| name | Yes | The name of the client | |
| providerId | Yes | The ID of the provider |
Implementation Reference
- src/index.ts:85-90 (handler)Handler function for the create_client tool that invokes the UseGrant SDK's createClient method, formats the client data as JSON, and returns it in the MCP response format.async ({ providerId, ...payload }) => { const client = await usegrant.createClient(providerId, payload); return { content: [{ type: 'text', text: JSON.stringify(client, null, 2) }], }; },
- src/index.ts:84-84 (schema)Input schema definition for the create_client tool, requiring providerId and spreading fields from UgSchema.CreateClientSchema.{ providerId: UgSchema.ProviderIdSchema, ...UgSchema.CreateClientSchema.shape },
- src/index.ts:81-91 (registration)Registration of the 'create_client' MCP tool using server.tool(), including name, description, input schema, and handler function.server.tool( 'create_client', 'Create a new client for a provider', { providerId: UgSchema.ProviderIdSchema, ...UgSchema.CreateClientSchema.shape }, async ({ providerId, ...payload }) => { const client = await usegrant.createClient(providerId, payload); return { content: [{ type: 'text', text: JSON.stringify(client, null, 2) }], }; }, );