check_authentication
Verifies whether the client is authenticated. Returns the current authentication status.
Instructions
Check if the client is currently authenticated
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "check_authentication"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:200-207 (registration)Tool 'check_authentication' is registered in the ListToolsRequestSchema handler with its name, description, and input schema.
{ name: "check_authentication", description: "Check if the client is currently authenticated", inputSchema: { type: "object", properties: {}, }, }, - src/index.ts:383-401 (handler)The checkAuthentication() private method is the handler that executes the tool logic. It checks if the REST client is configured, calls this.restClient.isAuthenticated(), and returns a text response with the authentication status.
private async checkAuthentication() { if (!this.restClient) { throw new Error( "REST client not configured. Use configure_rest_client tool or provide configuration via CLI/environment variables." ); } const isAuthenticated = this.restClient.isAuthenticated(); return { content: [ { type: "text", text: `Authentication status: ${ isAuthenticated ? "Authenticated" : "Not authenticated" }`, }, ], }; } - src/index.ts:203-206 (schema)The inputSchema for 'check_authentication' defines an empty object (no input parameters required).
inputSchema: { type: "object", properties: {}, }, - src/index.ts:240-241 (handler)The CallToolRequestSchema handler dispatches 'check_authentication' to this.checkAuthentication().
case "check_authentication": return await this.checkAuthentication(); - src/rest-client.ts:229-231 (helper)RestClient.isAuthenticated() delegates to authManager.isAuthenticated().
isAuthenticated(): boolean { return this.authManager.isAuthenticated(); }