Skip to main content
Glama

session_set_defaults

Set a default project directory or device serial for the session, eliminating the need to repeat them on every Gradle or device call. Individual calls can still override these defaults.

Instructions

Pin a default project_dir and/or serial for the rest of this session so later calls can omit them — the fix for a multi-module or multi-flavor project (or multiple attached devices) forcing you to repeat the same project_dir/serial on every Gradle or device call. Only the fields you pass are changed; omit a field to leave its current default alone. An explicit project_dir/serial on any individual call always overrides the session default for that one call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serialNoDefault device serial to use whenever a tool call omits serial. Leave empty to leave the current default unchanged.
project_dirNoDefault Android project root to use whenever a tool call omits project_dir. Leave empty to leave the current default unchanged.
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses key behaviors: only passed fields are changed, omitted fields retain their current default, and explicit parameters override session defaults. It does not mention reversibility (can be undone via session_clear_defaults), potential side effects, or whether defaults persist across session resets. This leaves some behavioral uncertainty.

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 three sentences: purpose, use case, and override behavior. It is front-loaded and well-structured. Each sentence adds value without redundancy. Minor opportunity to tighten, but overall efficient.

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?

Given the tool's simplicity (2 optional params, no output schema), the description covers purpose, usage context, partial update behavior, and interaction with explicit parameters. It does not explain return values, but that is acceptable. A mention of session_clear_defaults for reversing would improve completeness, but the current text is largely sufficient.

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 coverage is 100%, with both parameters described. The description adds context ('Only the fields you pass are changed; omit a field to leave its current default alone') but largely echoes the schema description ('Leave empty to leave the current default unchanged'). It adds marginal value beyond the schema, warranting a baseline 3.

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?

The description clearly states the tool's purpose: pinning default values for project_dir and/or serial for the session. It uses specific verbs ('Pin', 'set defaults') and identifies the resource (session defaults). However, it does not explicitly differentiate from sibling tools like session_clear_defaults or session_show_defaults, which would strengthen clarity.

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?

The description provides context on when to use the tool: 'the fix for a multi-module or multi-flavor project (or multiple attached devices) forcing you to repeat the same project_dir/serial on every Gradle or device call.' It also explains how explicit parameters override session defaults. However, it lacks explicit 'when not to use' guidance or mentions of alternative tools (e.g., prefer_pin might relate but isn't addressed).

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/iksnerd/adb-mcp'

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