Skip to main content
Glama
cainmaila

gemini-cli-mcp

by cainmaila

Execute Gemini Prompt

executePrompt

Runs a non-interactive prompt in the local Gemini CLI and returns the final result plus execution metadata. Delegates tasks to Gemini with configurable model, directory, timeout, and approval mode.

Instructions

Runs a non-interactive prompt through the locally installed Gemini CLI and returns the final result plus execution metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoOptional working directory for the Gemini CLI process
modelNoOptional Gemini model name
promptYesPrompt to send to the local Gemini CLI
timeoutMsNoOptional timeout in milliseconds
approvalModeNoOptional Gemini CLI approval mode

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
argsYes
signalYes
stderrYes
stdoutYes
abortedYes
commandYes
exitCodeYes
timedOutYes
elapsedMsYes
finalTextYes
errorMessageNo
workingDirectoryNo
effectiveApprovalModeNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.1

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries full responsibility for disclosing behavioral traits. It mentions running a prompt and returning metadata, but omits potential side effects such as code execution, credential requirements, or approval behaviors implied by the approvalMode enum (including 'yolo' and 'auto_edit'). No warnings about destructive or mutating outcomes are given.

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

Conciseness5/5

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

The description is a single 19-word sentence that front-loads the verb, resource, and scope. Every word contributes; there is no filler or repetition.

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

Completeness2/5

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

Even with complete parameter schema and an output schema, the description is too thin for a tool that wraps an external CLI with potentially risky approval modes. Missing context includes when to prefer it over siblings, prerequisites like having the Gemini CLI installed, and behavioral safety. An agent could call it wrongly or be surprised by side effects.

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

Parameters3/5

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

Schema description coverage is 100%, so all five parameters already have individual descriptions. The tool-level description adds no parameter-specific meaning beyond framing the prompt as 'non-interactive', which is not enough to lift above the baseline of 3.

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 specific action ('Runs a non-interactive prompt') and resource ('locally installed Gemini CLI'), and adds a distinctive output ('final result plus execution metadata'). This clearly separates it from executeImageTask and inspectGeminiCli, though overlap with executeTask is not explicitly addressed.

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 guidance is provided on when to use this tool versus siblings like executeTask or executeImageTask. There are no exclusions, prerequisites, or alternative routing hints; the only implicit signal is 'non-interactive', which is not developed into actionable direction.

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

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/cainmaila/gemini-cli-mcp'

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