Skip to main content
Glama

Workspace Open

workspace-open

Load an additional trusted C#/MSBuild workspace to query source, run diagnostics and code actions, and apply writable changes; files outside its root stay read-only.

Instructions

Loads an additional writable workspace. Open only a fully trusted workspace: loading evaluates MSBuild project logic, evaluated source inputs including external linked or package-provided documents become queryable, and later diagnostic or Code Action operations can load and execute project analyzers with the Host's permissions. Documents outside workspaceRoot remain read-only. If instance status reports that the workspace is or may be in use elsewhere, use it only for necessary queries, expect results to become stale, and coordinate mutation ownership before starting a transaction.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe absolute solution or project path to load.
aliasNoThe optional caller-friendly alias for the workspace.
workspaceRootNoThe optional absolute repository or workspace root used for coordination and transaction boundaries.
msBuildPropertiesNoThe optional allowlisted MSBuild global properties used to evaluate this workspace.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.4
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "warningInfo": {
      +      "properties": {
      +        "code": {
      +          "description": "The stable machine-readable warning code.",
      +          "type": "string"
      +        },
      +        "message": {
      +          "description": "The human-readable warning message.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "code",
      +        "message"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "oneOf": [
      +    {
      +      "properties": {
      +        "data": {
      +          "description": "Tool-specific result payload.",
      +          "properties": {
      +            "documentCount": {
      +              "description": "The loaded document count.",
      +              "type": "integer"
      +            },
      +            "loadDiagnostics": {
      +              "description": "Workspace load and advisory status diagnostics.",
      +              "items": {
      +                "properties": {
      +                  "id": {
      +                    "description": "The diagnostic identifier.",
      +                    "type": "string"
      +                  },
      +                  "location": {
      +                    "description": "The optional source location of the diagnostic.",
      +                    "properties": {
      +                      "column": {
      +                        "description": "The one-based column number.",
      +                        "type": "integer"
      +                      },
      +                      "document": {
      +                        "description": "The resolved document.",
      +                        "properties": {
      +                          "documentId": {
      +                            "description": "The document identifier.",
      +                            "type": "string"
      +                          },
      +                          "path": {
      +                            "description": "The normalized document path.",
      +                            "type": "string"
      +                          },
      +                          "projectId": {
      +                            "description": "The owning project identifier.",
      +                            "type": "string"
      +                          }
      +                        },
      +                        "required": [
      +                          "documentId",
      +                          "path",
      +                          "projectId"
      +                        ],
      +                        "type": [
      +                          "object",
      +                          "null"
      +                        ]
      +                      },
      +                      "line": {
      +                        "description": "The one-based line number.",
      +                        "type": "integer"
      +                      },
      +                      "selector": {
      +                        "description": "The canonical selector that can resolve this source location again.",
      +                        "properties": {
      +                          "span": {
      +                            "properties": {
      +                              "document": {
      +                                "description": "Provide exactly one of path or documentId.",
      +                                "properties": {
      +                                  "documentId": {
      +                                    "description": "Workspace-local document ID.",
      +                                    "type": [
      +                                      "string",
      +                                      "null"
      +                                    ]
      +                                  },
      +                                  "path": {
      +                                    "description": "Workspace-relative path.",
      +                                    "type": [
      +                                      "string",
      +                                      "null"
      +                                    ]
      +                                  },
      +                                  "project": {
      +                                    "description": "Disambiguates documents with matching paths or IDs.",
      +                                    "properties": {
      +                                      "name": {
      +                                        "type": [
      +                                          "string",
      +                                          "null"
      +                                        ]
      +                                      },
      +                                      "path": {
      +                                        "description": "Workspace-relative path.",
      +                                        "type": [
      +                                          "string",
      +                                          "null"
      +                                        ]
      +                                      },
      +                                      "projectId": {
      +                                        "type": [
      +                                          "string",
      +                                          "null"
      +                                        ]
      +                                      },
      +                                      "targetFramework": {
      +                                        "type": [
      +                                          "string",
      +                                          "null"
      +                                        ]
      +                                      }
      +                                    },
      +                                    "type": [
      +                                      "object",
      +                                      "null"
      +                                    ]
      +                                  }
      +                                },
      +                                "type": "object"
      +                              },
      +                              "range": {
      +                                "description": "Zero-based UTF-16 range.",
      +                                "properties": {
      +                                  "length": {
      +                                    "description": "UTF-16 code-unit length.",
      +                                    "maximum": 2147483647,
      +                                    "minimum": 0,
      +                                    "type": "integer"
      +                                  },
      +                                  "start": {
      +                                    "description": "Zero-based UTF-16 offset.",
      +                                    "maximum": 2147483647,
      +                                    "minimum": 0,
      +                                    "type": "integer"
      +                                  }
      +                                },
      +                                "type": "object"
      +                              }
      +                            },
      +                            "required": [
      +                              "document",
      +                              "range"
      +                            ],
      +                            "type": "object"
      +                          }
      +                        },
      +                        "required": [
      +                          "span"
      +                        ],
      +                        "type": [
      +                          "object",
      +                          "null"
      +                        ]
      +                      },
      +                      "snapshot": {
      +                        "description": "The exact immutable workspace snapshot associated with this location.",
      +                        "properties": {
      +                          "snapshotId": {
      +                            "format": "uuid",
      +                            "type": "string"
      +                          },
      +                          "transactionRevision": {
      +                            "type": [
      +                              "integer",
      +                              "null"
      +                            ]
      +                          },
      +                          "workspaceEpoch": {
      +                            "type": "integer"
      +                          },
      +                          "workspaceId": {
      +                            "format": "uuid",
      +                            "type": "string"
      +                          }
      +                        },
      +                        "required": [
      +                          "workspaceId",
      +                          "workspaceEpoch",
      +                          "snapshotId",
      +                          "transactionRevision"
      +                        ],
      +                        "type": "object"
      +                      },
      +                      "span": {
      +                        "description": "The resolved text span.",
      +                        "properties": {
      +                          "length": {
      +                            "description": "UTF-16 code-unit length.",
      +                            "maximum": 2147483647,
      +                            "minimum": 0,
      +                            "type": "integer"
      +                          },
      +                          "start": {
      +                            "description": "Zero-based UTF-16 offset.",
      +                            "maximum": 2147483647,
      +                            "minimum": 0,
      +                            "type": "integer"
      +                          }
      +                        },
      +                        "type": [
      +                          "object",
      +                          "null"
      +                        ]
      +                      }
      +                    },
      +                    "required": [
      +                      "snapshot"
      +                    ],
      +                    "type": [
      +                      "object",
      +                      "null"
      +                    ]
      +                  },
      +                  "message": {
      +                    "description": "The diagnostic message.",
      +                    "type": "string"
      +                  },
      +                  "severity": {
      +                    "description": "The diagnostic severity.",
      +                    "enum": [
      +                      "Hidden",
      +                      "Info",
      +                      "Warning",
      +                      "Error"
      +                    ],
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "id",
      +                  "message"
      +                ],
      +                "type": "object"
      +              },
      +              "type": "array"
      +            },
      +            "projectCount": {
      +              "description": "The loaded project count.",
      +              "type": "integer"
      +            },
      +            "workspace": {
      +              "description": "The loaded workspace identity.",
      +              "properties": {
      +                "alias": {
      +                  "description": "The optional caller-friendly alias.",
      +                  "type": [
      +                    "string",
      +                    "null"
      +                  ]
      +                },
      +                "loadedPath": {
      +                  "description": "The absolute path of the loaded workspace.",
      +                  "type": "string"
      +                },
      +                "workspaceEpoch": {
      +                  "description": "The workspace epoch for the loaded baseline.",
      +                  "type": "integer"
      +                },
      +                "workspaceId": {
      +                  "description": "The stable server-generated workspace identifier.",
      +                  "format": "uuid",
      +                  "type": "string"
      +                },
      +                "workspaceRoot": {
      +                  "description": "The absolute repository or workspace root used for coordination and transaction boundaries.",
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "loadedPath",
      +                "workspaceRoot"
      +              ],
      +              "type": [
      +                "object",
      +                "null"
      +              ]
      +            }
      +          },
      +          "type": [
      +            "object",
      +            "null"
      +          ]
      +        },
      +        "ok": {
      +          "const": true,
      +          "description": "Whether the tool invocation succeeded."
      +        },
      +        "snapshot": {
      +          "description": "Exact immutable workspace snapshot associated with the result, when available.",
      +          "properties": {
      +            "snapshotId": {
      +              "format": "uuid",
      +              "type": "string"
      +            },
      +            "transactionRevision": {
      +              "type": [
      +                "integer",
      +                "null"
      +              ]
      +            },
      +            "workspaceEpoch": {
      +              "type": "integer"
      +            },
      +            "workspaceId": {
      +              "format": "uuid",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "workspaceId",
      +            "workspaceEpoch",
      +            "snapshotId",
      +            "transactionRevision"
      +          ],
      +          "type": "object"
      +        },
      +        "warnings": {
      +          "description": "Non-fatal warnings the agent should consider.",
      +          "items": {
      +            "$ref": "#/$defs/warningInfo"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "ok",
      +        "data"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "properties": {
      +        "continuation": {
      +          "description": "Action the agent should take before retrying or continuing.",
      +          "oneOf": [
      +            {
      +              "additionalProperties": false,
      +              "properties": {
      +                "instruction": {
      +                  "description": "Agent-facing instruction explaining how to continue.",
      +                  "minLength": 1,
      +                  "type": "string"
      +                },
      +                "kind": {
      +                  "const": "CallTool",
      +                  "description": "Action required before the original request can continue."
      +                },
      +                "tool": {
      +                  "description": "Tool to call before continuing the original request.",
      +                  "minLength": 1,
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "kind",
      +                "tool",
      +                "instruction"
      +              ],
      +              "type": "object"
      +            },
      +            {
      +              "additionalProperties": false,
      +              "properties": {
      +                "instruction": {
      +                  "description": "Agent-facing instruction explaining how to continue.",
      +                  "minLength": 1,
      +                  "type": "string"
      +                },
      +                "kind": {
      +                  "const": "ChooseTool",
      +                  "description": "Action required before the original request can continue."
      +                },
      +                "tools": {
      +                  "description": "Allowed tool choices from which the agent must select one.",
      +                  "items": {
      +                    "description": "Name of a tool the agent may choose.",
      +                    "minLength": 1,
      +                    "type": "string"
      +                  },
      +                  "minItems": 1,
      +                  "type": "array",
      +                  "uniqueItems": true
      +                }
      +              },
      +              "required": [
      +                "kind",
      +                "tools",
      +                "instruction"
      +              ],
      +              "type": "object"
      +            },
      +            {
      +              "additionalProperties": false,
      +              "properties": {
      +                "instruction": {
      +                  "description": "Agent-facing instruction explaining how to continue.",
      +                  "minLength": 1,
      +                  "type": "string"
      +                },
      +                "kind": {
      +                  "const": "RetryRequest",
      +                  "description": "Action required before the original request can continue."
      +                }
      +              },
      +              "required": [
      +                "kind",
      +                "instruction"
      +              ],
      +              "type": "object"
      +            },
      +            {
      +              "additionalProperties": false,
      +              "properties": {
      +                "instruction": {
      +                  "description": "Agent-facing instruction explaining how to continue.",
      +                  "minLength": 1,
      +                  "type": "string"
      +                },
      +                "kind": {
      +                  "const": "ReviseRequest",
      +                  "description": "Action required before the original request can continue."
      +                }
      +              },
      +              "required": [
      +                "kind",
      +                "instruction"
      +              ],
      +              "type": "object"
      +            },
      +            {
      +              "additionalProperties": false,
      +              "properties": {
      +                "instruction": {
      +                  "description": "Agent-facing instruction explaining how to continue.",
      +                  "minLength": 1,
      +                  "type": "string"
      +                },
      +                "kind": {
      +                  "const": "ResolveExternally",
      +                  "description": "Action required before the original request can continue."
      +                }
      +              },
      +              "required": [
      +                "kind",
      +                "instruction"
      +              ],
      +              "type": "object"
      +            }
      +          ]
      +        },
      +        "diagnostics": {
      +          "description": "Diagnostics that explain the failed invocation.",
      +          "items": {
      +            "properties": {
      +              "id": {
      +                "description": "The diagnostic identifier.",
      +                "type": "string"
      +              },
      +              "location": {
      +                "description": "The optional source location of the diagnostic.",
      +                "properties": {
      +                  "column": {
      +                    "description": "The one-based column number.",
      +                    "type": "integer"
      +                  },
      +                  "document": {
      +                    "description": "The resolved document.",
      +                    "properties": {
      +                      "documentId": {
      +                        "description": "The document identifier.",
      +                        "type": "string"
      +                      },
      +                      "path": {
      +                        "description": "The normalized document path.",
      +                        "type": "string"
      +                      },
      +                      "projectId": {
      +                        "description": "The owning project identifier.",
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "documentId",
      +                      "path",
      +                      "projectId"
      +                    ],
      +                    "type": [
      +                      "object",
      +                      "null"
      +                    ]
      +                  },
      +                  "line": {
      +                    "description": "The one-based line number.",
      +                    "type": "integer"
      +                  },
      +                  "selector": {
      +                    "description": "The canonical selector that can resolve this source location again.",
      +                    "properties": {
      +                      "span": {
      +                        "properties": {
      +                          "document": {
      +                            "description": "Provide exactly one of path or documentId.",
      +                            "properties": {
      +                              "documentId": {
      +                                "description": "Workspace-local document ID.",
      +                                "type": [
      +                                  "string",
      +                                  "null"
      +                                ]
      +                              },
      +                              "path": {
      +                                "description": "Workspace-relative path.",
      +                                "type": [
      +                                  "string",
      +                                  "null"
      +                                ]
      +                              },
      +                              "project": {
      +                                "description": "Disambiguates documents with matching paths or IDs.",
      +                                "properties": {
      +                                  "name": {
      +                                    "type": [
      +                                      "string",
      +                                      "null"
      +                                    ]
      +                                  },
      +                                  "path": {
      +                                    "description": "Workspace-relative path.",
      +                                    "type": [
      +                                      "string",
      +                                      "null"
      +                                    ]
      +                                  },
      +                                  "projectId": {
      +                                    "type": [
      +                                      "string",
      +                                      "null"
      +                                    ]
      +                                  },
      +                                  "targetFramework": {
      +                                    "type": [
      +                                      "string",
      +                                      "null"
      +                                    ]
      +                                  }
      +                                },
      +                                "type": [
      +                                  "object",
      +                                  "null"
      +                                ]
      +                              }
      +                            },
      +                            "type": "object"
      +                          },
      +                          "range": {
      +                            "description": "Zero-based UTF-16 range.",
      +                            "properties": {
      +                              "length": {
      +                                "description": "UTF-16 code-unit length.",
      +                                "maximum": 2147483647,
      +                                "minimum": 0,
      +                                "type": "integer"
      +                              },
      +                              "start": {
      +                                "description": "Zero-based UTF-16 offset.",
      +                                "maximum": 2147483647,
      +                                "minimum": 0,
      +                                "type": "integer"
      +                              }
      +                            },
      +                            "type": "object"
      +                          }
      +                        },
      +                        "required": [
      +                          "document",
      +                          "range"
      +                        ],
      +                        "type": "object"
      +                      }
      +                    },
      +                    "required": [
      +                      "span"
      +                    ],
      +                    "type": [
      +                      "object",
      +                      "null"
      +                    ]
      +                  },
      +                  "snapshot": {
      +                    "description": "The exact immutable workspace snapshot associated with this location.",
      +                    "properties": {
      +                      "snapshotId": {
      +                        "format": "uuid",
      +                        "type": "string"
      +                      },
      +                      "transactionRevision": {
      +                        "type": [
      +                          "integer",
      +                          "null"
      +                        ]
      +                      },
      +                      "workspaceEpoch": {
      +                        "type": "integer"
      +                      },
      +                      "workspaceId": {
      +                        "format": "uuid",
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "workspaceId",
      +                      "workspaceEpoch",
      +                      "snapshotId",
      +                      "transactionRevision"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "span": {
      +                    "description": "The resolved text span.",
      +                    "properties": {
      +                      "length": {
      +                        "description": "UTF-16 code-unit length.",
      +                        "maximum": 2147483647,
      +                        "minimum": 0,
      +                        "type": "integer"
      +                      },
      +                      "start": {
      +                        "description": "Zero-based UTF-16 offset.",
      +                        "maximum": 2147483647,
      +                        "minimum": 0,
      +                        "type": "integer"
      +                      }
      +                    },
      +                    "type": [
      +                      "object",
      +                      "null"
      +                    ]
      +                  }
      +                },
      +                "required": [
      +                  "snapshot"
      +                ],
      +                "type": [
      +                  "object",
      +                  "null"
      +                ]
      +              },
      +              "message": {
      +                "description": "The diagnostic message.",
      +                "type": "string"
      +              },
      +              "severity": {
      +                "description": "The diagnostic severity.",
      +                "enum": [
      +                  "Hidden",
      +                  "Info",
      +                  "Warning",
      +                  "Error"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "id",
      +              "message"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "error": {
      +          "description": "Structured error details when the invocation failed.",
      +          "properties": {
      +            "code": {
      +              "description": "Stable machine-readable error code.",
      +              "type": "string"
      +            },
      +            "correlationId": {
      +              "description": "Correlation identifier for matching the failure to server-side diagnostics, when available.",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "message": {
      +              "description": "Human-readable explanation of the failure.",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "code",
      +            "message"
      +          ],
      +          "type": "object"
      +        },
      +        "ok": {
      +          "const": false,
      +          "description": "Whether the tool invocation succeeded."
      +        },
      +        "warnings": {
      +          "description": "Non-fatal warnings the agent should consider.",
      +          "items": {
      +            "$ref": "#/$defs/warningInfo"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "ok",
      +        "error"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "properties": {
      +        "diagnostics": {
      +          "description": "Diagnostics that explain the failed invocation.",
      +          "properties": {
      +            "detailsAvailable": {
      +              "const": true
      +            },
      +            "detailsTool": {
      +              "const": "get-error-details"
      +            }
      +          },
      +          "required": [
      +            "detailsAvailable",
      +            "detailsTool"
      +          ],
      +          "type": "object"
      +        },
      +        "error": {
      +          "description": "Structured error details when the invocation failed.",
      +          "properties": {
      +            "code": {
      +              "const": "UnhandledException"
      +            },
      +            "correlationId": {
      +              "format": "uuid",
      +              "type": "string"
      +            },
      +            "message": {
      +              "const": "Tool execution failed."
      +            }
      +          },
      +          "required": [
      +            "code",
      +            "message",
      +            "correlationId"
      +          ],
      +          "type": "object"
      +        },
      +        "ok": {
      +          "const": false,
      +          "description": "Whether the tool invocation succeeded."
      +        },
      +        "reporting": {
      +          "description": "Error-reporting workflow available for an unhandled failure.",
      +          "properties": {
      +            "canPrepare": {
      +              "type": "boolean"
      +            },
      +            "prepareTool": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "state": {
      +              "enum": [
      +                "Available",
      +                "AlwaysApproved",
      +                "DisabledByConfiguration",
      +                "ApprovalUnavailable"
      +              ],
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "state"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "ok",
      +        "error",
      +        "diagnostics"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "type": "object"
      +}
  2. First observedv1.0.2

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare only readOnlyHint=false, idempotentHint=false and destructiveHint=false; the description adds substantial context beyond them: MSBuild project logic is evaluated, external linked/package documents become queryable, analyzers later execute with Host permissions, documents outside workspaceRoot stay read-only, and shared-instance results can go stale. These are exactly the trust and side-effect disclosures a load tool needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded and every clause carries a distinct payload (trust, evaluation, permissions, read-only scope, concurrency). It is dense and long but essentially waste-free; only the shared-instance sentence runs slightly long.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex, security-sensitive load operation with an output schema already covering return values, the description supplies the trust warning, side-effect model, scope boundary, and concurrency caveat an agent needs to invoke it safely. Nothing material is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description nevertheless adds meaning by explaining the read-only boundary that workspaceRoot establishes ('Documents outside workspaceRoot remain read-only'), clarifying a parameter the schema describes only as a coordination boundary.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening clause states a specific verb and resource ('Loads an additional writable workspace'), and the 'additional' framing cleanly separates it from workspace-reload, workspace-close, and workspace-list. An agent knows exactly what this does without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a clear when-to-use constraint ('Open only a fully trusted workspace') and a conditional fallback for the shared-instance case (use for necessary queries only, expect staleness, coordinate mutation ownership). It does not explicitly name a sibling alternative (e.g. workspace-reload), so it falls just short of the top band.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.