schematics_get_workspace
Retrieve details of a specific IBM Cloud Schematics workspace by providing the workspace ID.
Instructions
Get workspace details
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workspace_id": "<workspace_id>"
},
"name": "schematics_get_workspace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_id | Yes |
Implementation Reference
- src/tools/schematics/index.ts:16-18 (handler)The actual handler for schematics_get_workspace. It registers an MCP tool that takes a workspace_id parameter (z.string()) and performs a GET request to the Schematics v1 API endpoint `${base}/workspaces/${p.workspace_id}` using the IBMCloudAPIClient, wrapped in safeTool for error handling.
server.tool("schematics_get_workspace", "Get workspace details", { workspace_id: z.string(), }, async (p) => safeTool(() => client.get(`${base}/workspaces/${p.workspace_id}`))); - src/tools/schematics/index.ts:16-18 (schema)The input schema for schematics_get_workspace: requires a single string parameter 'workspace_id' validated via Zod (z.string()).
server.tool("schematics_get_workspace", "Get workspace details", { workspace_id: z.string(), }, async (p) => safeTool(() => client.get(`${base}/workspaces/${p.workspace_id}`))); - src/server.ts:83-84 (registration)The tool is registered at the server level by calling registerSchematicsTools(server, client, config) inside createServer(), which is where all tool sets are wired together.
registerSchematicsTools(server, client, config); console.error(` ✓ Schematics (8 tools)`); - src/config.ts:66-69 (helper)The SCHEMATICS endpoint definition used to build the base URL: `https://schematics.{region}.cloud.ibm.com/v1` for v1 API calls, and `https://schematics.{region}.cloud.ibm.com/v2` for v2.
SCHEMATICS: (region: string) => `https://schematics.${region}.cloud.ibm.com/v1`, SCHEMATICS_V2: (region: string) => `https://schematics.${region}.cloud.ibm.com/v2`, - src/lib/api-client.ts:128-130 (helper)The get() method on IBMCloudAPIClient that executes the actual HTTP GET request. It delegates to the generic request() method with method: 'GET'.
async get<T = unknown>(url: string, queryParams?: Record<string, string | number | boolean | undefined>): Promise<T> { return this.request<T>(url, { method: "GET", queryParams }); }