Skip to main content
Glama

opencode_get_project

Read-onlyIdempotent

Retrieves the active project path and metadata from opencode, providing current project context for your CLI session.

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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Annotations (readOnlyHint, idempotentHint) already convey the safety profile. The description adds behavioral context by specifying the exact return envelope (success, message, data.project) and the nature of the output (project path and metadata), going beyond the annotations without contradicting them.

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?

The description is concise and front-loaded with a purpose statement, followed by a structured return format and an example. The example is largely redundant for a zero-argument call, but the overall layout is clean and every substantive part serves the agent's understanding.

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 simple, zero-parameter, read-only getter with strong annotations and an explicit return format, the description provides all needed context. It states the tool's purpose, its output structure, and an example invocation. Error cases are not documented but are not critical for this safe, idempotent operation.

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 has zero parameters, so the description does not need to explain parameter semantics. Schema coverage is 100% by default, and the baseline for zero-parameter tools is 4. The description appropriately avoids inventing unnecessary parameter details.

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 description states a clear verb-object pair ('Get the current project context') and further specifies the resource ('active project path and metadata'). This distinguishes it from sibling tools like opencode_get_session or opencode_get_config, which target different resources.

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

Usage Guidelines3/5

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

Usage is implied by the phrase 'current project context' and the tool's zero-parameter signature, but there is no explicit guidance about when to use this tool versus alternatives or when not to use it. The description lacks exclusions or references to sibling tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sandraschi/opencode-cli-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server