Skip to main content
Glama
imjdl

ghidra-fleet

by imjdl

Set Function Prototype

set_function_prototype

Set a function's prototype or signature in Ghidra to correct decompiled types and improve analysis accuracy.

Instructions

设置函数原型/签名,例如 'int func(char *buf, int len)'。

Input Schema

NameRequiredDescriptionDefault
binaryYes
functionYes
prototypeYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/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 disclosure burden. It does not say whether an existing prototype is overwritten, what happens if the signature fails to parse or the function is missing, what permissions or analysis state are required, or whether the change is persisted to the database.

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?

A single short sentence with the verb, resource, and a compact example — no filler, front-loaded. The terseness is efficient but borders on under-specification for a three-parameter mutation tool.

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 the gaps are substantial: with zero annotation coverage and 0% schema documentation, the agent still lacks the identifier format for 'binary' and 'function' and has no idea what state the binary must be in for the prototype to apply.

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 all three required parameters depend on the description. The example implicitly clarifies the 'prototype' parameter's expected C syntax, but 'binary' (path? ID? name?) and 'function' (name? mangled? address?) receive no explanation at all.

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?

States a specific verb and resource (set a function's prototype/signature) and reinforces it with a concrete C-style example, so an agent knows exactly what changes. It does not explicitly contrast itself with siblings like rename_function or set_local_variable_type, so differentiation is only inferable from context.

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 versus rename_function, set_local_variable_type, or decompile_function, nor any stated preconditions (binary must be loaded/analyzed, function must already exist). The example shows 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.