open_class
Open InterSystems IRIS ObjectScript class documentation to view properties, methods, and usage examples for development reference.
Instructions
Abre Documatic por nombre de clase (ej. %Library.String).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| class | Yes | Class name |
Implementation Reference
- src/request/call-schema.request.ts:62-77 (handler)Handler function for the "open_class" tool. Extracts the class name from input arguments, validates it, fetches the class documentation using fetchClassDoc, and returns the documentation text in the required MCP response format.case "open_class": { const className = args?.class as string; if (!className) { throw new Error("Class name is required"); } const doc = await fetchClassDoc(className); return { content: [ { type: "text", text: doc.text, }, ], }; }
- src/tools/open-class.tool.ts:3-17 (schema)Tool definition including the name, description, and input schema specifying a required 'class' string parameter with minimum length 3.export const OPEN_CLASS: Tool = { name: "open_class", description: "Abre Documatic por nombre de clase (ej. %Library.String).", inputSchema: { type: "object", properties: { class: { type: "string", description: "Class name", minLength: 3, }, }, required: ["class"], }, };
- src/tools/core.tool.ts:18-22 (registration)Registration of core tools list, including OPEN_CLASS, exported as coreTools for use in server tool listing.export const coreTools = async () => { return { tools: [SMART_SEARCH, SEARCH_OBJECTSCRIPT, OPEN_BY_KEY, OPEN_CLASS], }; };
- src/server.ts:36-39 (registration)Server request handler registrations: ListToolsRequestSchema to coreTools (which lists open_class), and CallToolRequestSchema to callShema (which handles calls to open_class).server.setRequestHandler(ListToolsRequestSchema, coreTools); server.setRequestHandler(CallToolRequestSchema, callShema);
- src/tools/core.tool.ts:2-2 (registration)Import of the OPEN_CLASS tool definition into core.tool.ts for inclusion in the tools list.import { OPEN_CLASS } from "./open-class.tool.js";