Skip to main content
Glama
FrontForge

FrontForge

by quardianwolf

create_query_hook

Generates React Query hooks for a feature resource, including query keys plus list and detail hooks to standardize data fetching.

Instructions

Create a React Query hook for a resource inside a feature. Generates query keys, list hook, and detail hook.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "cwd": "<cwd>",
      "featureName": "<featureName>",
      "resourceName": "<resourceName>"
    },
    "name": "create_query_hook"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdYesProject root directory path
baseUrlNoBase API URL for mobile (e.g., "https://api.example.com"). Web uses relative /api/ paths.
platformNoauto
featureNameYesFeature name (e.g., "Profile")
resourceNameYesResource name in PascalCase (e.g., "User", "Post")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden, and it does add real behavioral value by listing the generated artifacts (query keys, list hook, detail hook). However, it is silent on critical mutation behavior for a codegen tool: where files are written, whether existing files are overwritten or skipped, and whether it touches barrel exports or index files.

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?

Two short sentences, action first and generated outputs second, with no filler. Every clause conveys distinct information an agent could act on.

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?

For a multi-file generative tool with five parameters and no output schema, the agent still lacks the output locations, overwrite policy, and scaffolding prerequisites. The description identifies what is produced but not enough to predict the effect on disk, which is the main risk here.

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 80%, so cwd, featureName, resourceName, baseUrl, and platform are largely documented in the schema itself, establishing the baseline of 3. The description adds no parameter-level meaning, such as how featureName and resourceName map into file paths or how platform interacts with baseUrl.

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 names a specific verb and artifact ('Create a React Query hook') and enumerates exactly what gets generated: query keys, list hook, detail hook. This distinguishes it from create_component or create_feature by output content. It stops short of explicitly naming which sibling to use instead, which keeps it out of the top band.

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 when-to-use or when-not-to-use guidance and no prerequisite stated, even though setup_query_provider exists as a sibling and a query hook almost certainly depends on that provider being configured. The phrase 'for a resource inside a feature' implies context but gives the agent no decision rule for choosing between this and the feature/component generators.

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