Skip to main content
Glama

opencode_get_project

Read-onlyIdempotent

Get the current project context from opencode.

Instructions

Get the current project context from opencode.

Returns the active project path and metadata.

Return Format

{"success": bool, "message": str, "data": {"project": dict}}

Examples

opencode_get_project()

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.11
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  2. First observedv0.2.3

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint and idempotentHint, so safety and repeatability are covered. The description adds the return shape ({success, message, data.project}), which is genuinely useful context beyond the annotations. It does not cover failure behavior or what happens when no project is active.

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?

Front-loaded with the purpose, followed by the return format. The Examples section containing just 'opencode_get_project()' adds nothing for a zero-arg tool and is the only wasted line.

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

Completeness4/5

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

There is no output schema, so the description carries the burden of describing the response, and it does so with the exact return shape. The main missing piece is the no-active-project / failure case, which matters for a context-discovery tool.

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?

The tool takes zero parameters, so there is nothing for the description to disambiguate; the baseline for a no-arg tool is 4.

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

Purpose4/5

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

States a specific verb and resource ('Get the current project context') and narrows to 'active project path and metadata', which separates it from sibling getters like opencode_get_config and opencode_get_health. It does not explicitly name those siblings as alternatives, but the resource is distinct enough to be unambiguous.

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

Usage Guidelines2/5

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

No statement of when to call this versus opencode_get_config, opencode_system, or opencode_get_session, and no prerequisites or exclusions. The only hint of usage is that it returns 'the active project', which an agent must infer.

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