Skip to main content
Glama

gsep_after_llm

After an LLM responds, execute C4 behavioral immune checks and fitness recording to return a safe response before content is shown to users or tools.

Instructions

Middleware hook to run after an external LLM responds. Runs C4 behavioral immune checks, records fitness, and returns safe_response before content is shown to users or tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idNoUser identifier for personalization and audit context
responseYesRaw LLM response to verify before showing or executing
genome_idYesUnique identifier for this agent genome
task_typeNoTask type hint, e.g. support, coding, research
user_messageYesOriginal user message that produced this LLM response
Behavior2/5

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

No annotations exist, so the description must fully disclose behavioral traits. It reveals that the tool runs checks, records fitness, and returns a safe_response, but fails to specify side effects (e.g., database writes, state changes), what happens if checks fail, or whether it blocks or is async. This leaves significant gaps for an agent to predict behavior.

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 two sentences long, front-loaded with the core purpose, and contains no filler. Every word adds value.

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

Completeness3/5

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

For a middleware hook with no output schema, the description should cover return value format, error handling, and pipeline integration. It mentions safe_response but does not describe its structure or behavior on failure. While the core flow is clear, key operational details are missing.

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 the description adds minimal new meaning. It generically names the tool's purpose but does not elaborate on how parameters like genome_id, user_message, or response are used beyond what the schema already says. Falls at baseline for high-coverage schema.

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 tool is a middleware hook that runs after an external LLM responds, performing C4 behavioral immune checks, recording fitness, and returning a safe_response. This distinguishes it from sibling hooks like gsep_before_llm (runs before LLM) and gsep_after_tool (runs after tool calls), providing a specific verb and resource.

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?

The description implies usage 'after an external LLM responds,' but does not explicitly state when to use or avoid this tool versus alternatives like gsep_before_llm or gsep_scan_output. No guidance on prerequisites or scenarios where this should be bypassed.

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/gsepcore/gsep-mcp'

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