iaptic_current_app
Retrieve the active Iaptic app name and verify credential configuration.
Instructions
Get information about the currently active Iaptic app.
Returns the current app name
Indicates whether using default or custom credentials
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/app.ts:110-118 (handler)Handler that executes the 'iaptic_current_app' tool logic. It calls this.api.getCurrentAppInfo() and returns a text response with the current app name, credential type, and whether a master key is being used.
case 'iaptic_current_app': { const appInfo = this.api.getCurrentAppInfo(); return { content: [{ type: "text", text: `Current app: ${appInfo.appName} (${appInfo.isDefault ? 'default' : 'custom'} credentials, ${appInfo.usingMasterKey ? 'using master key' : 'using app-specific API key'})` }] }; } - src/tools/app.ts:50-58 (schema)Schema/registration definition for the 'iaptic_current_app' tool. It has no input parameters (empty properties) and provides a description of what the tool does.
{ name: "iaptic_current_app", description: `Get information about the currently active Iaptic app. - Returns the current app name - Indicates whether using default or custom credentials`, inputSchema: { type: "object", properties: {} } - src/tools/app.ts:12-63 (registration)The 'getTools()' method in AppTools class registers the tool as part of the available tools list.
getTools() { const appNameRequired = this.isAppNameRequired(); // Base set of tools const tools = [ { name: "iaptic_switch_app", description: `Switch to a different Iaptic app. - Allows temporarily using a different app's credentials - All subsequent API calls will use the new app name and API key - Useful for managing multiple apps in the same session - Required: appName parameter (apiKey required only if not using master key)`, inputSchema: { type: "object", properties: { appName: { type: "string", description: "Name of the app to switch to" }, apiKey: { type: "string", description: "API key for the app (not required if using master key)" } }, required: ["appName"] } }, { name: "iaptic_reset_app", description: `Reset to the default Iaptic app. - Reverts to the original app credentials provided during server initialization - All subsequent API calls will use the default app name and API key - Use this after using iaptic_switch_app to return to the default app`, inputSchema: { type: "object", properties: {} } }, { name: "iaptic_current_app", description: `Get information about the currently active Iaptic app. - Returns the current app name - Indicates whether using default or custom credentials`, inputSchema: { type: "object", properties: {} } } ]; return tools; } - src/iaptic-api.ts:163-169 (helper)Helper method on IapticAPI that returns information about the currently active app (name, whether it's the default, and whether a master key is being used). This is the underlying data provider for the tool handler.
getCurrentAppInfo(): { appName: string, isDefault: boolean, usingMasterKey: boolean } { return { appName: this.appName, isDefault: this.appName === this.defaultAppName && this.apiKey === this.defaultApiKey, usingMasterKey: !!this.masterKey }; }