Skip to main content
Glama

update_agent_session

Updates or registers an agent's active task and state in a PostgreSQL database with thread-safe upsert, ensuring coordination and preventing conflicts.

Instructions

Updates or registers the active task and state of an agent in the database (thread-safe upsert).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
db_nameYes
agent_nameYes
active_taskYes
active_fileNo
statusNoactive

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

The description adds behavioral context with 'thread-safe upsert', which is beyond the schema's domain. It implies atomicity and concurrency safety, but does not detail side effects like complete overwrite of existing state or necessary permissions.

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, front-loaded sentence that conveys the core purpose and a key behavioral trait (thread-safe upsert) without unnecessary words.

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?

Given the tool's complexity (5 parameters, no schema descriptions, no annotations), the description is too minimal. It omits details on parameter effects, return values (despite an output schema existing), and the overall impact of the upsert operation.

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

Parameters2/5

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

With 0% schema description coverage, the description does not explain individual parameters. It mentions 'active task' and vaguely references 'state', but fails to clarify the roles of db_name, agent_name, active_file, or status.

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 clearly states the verb 'updates or registers' and the resource 'active task and state of an agent in the database', making it distinct from sibling tools like update_record which is more generic. It explicitly uses 'upsert' to indicate combined insert/update behavior.

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 explicit guidance is provided on when to use this tool versus alternatives. The description lacks conditions, prerequisites, or scenarios where this tool is preferred over siblings like update_record or add_record.

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/Janadasroor/pg-mnemosyne-mcp'

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