Skip to main content
Glama

set_function_prototype

Set a function's signature from a C prototype to define parameter types and return values, improving Ghidra decompilation.

Instructions

Set a function's signature from a C prototype, e.g. "int foo(char *buf, int len)".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prototypeYes
function_addressYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.8/5.0
Behavior2/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. 'Set' implies a mutation, but it never states whether an existing signature is overwritten, whether the function must already exist, what effect it has on decompilation output, or any permission requirements. Only the input format is disclosed.

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?

A single front-loaded sentence that states the action and immediately grounds it with a concrete example. No filler, and the example is the most information-dense part of the definition.

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?

An output schema exists, so return values need not be described, but for a mutation tool with no annotations and zero parameter documentation the definition is still thin. It omits overwrite behavior, prerequisites, and any effect on downstream analysis, which an agent needs before invoking it.

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?

Schema description coverage is 0%, so the description must compensate. The C prototype example does clarify the expected format of the 'prototype' parameter beyond the bare 'string' type, but 'function_address' is left entirely unexplained (format, expected address form, whether it accepts a name).

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 states a specific verb and resource ('Set a function's signature') and the concrete C example 'int foo(char *buf, int len)' makes the operation unambiguous, distinguishing it in spirit from rename_function or set_local_variable_type. It stops short of naming an alternative sibling, so it earns a 4 rather than a 5.

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?

There is no guidance on when to use this tool versus alternatives like rename_function or set_local_variable_type, nor any prerequisites (e.g. the function must exist, existing signature gets overwritten). The example clarifies the input format but not the usage context.

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