Skip to main content
Glama

feedback

Report whether a recommended tool worked to improve future recommendations. Provide your outcome and optional comment after trying a tool from search results.

Instructions

Report whether a recommended tool worked or not. This closes the learning loop — the Unfragile graph uses this feedback to improve future recommendations. Call this after trying a tool from search results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
matchRecordIdYesMatch record ID from search results (shown at the bottom of search output)
outcomeYesDid the recommended tool work for your use case?
commentNoOptional: brief note on why it worked or didn't

Implementation Reference

  • src/index.ts:712-718 (registration)
    Registration of the 'feedback' tool with the MCP server, including schema (zod validation for matchRecordId, outcome, comment) and description.
    server.tool(
      "feedback",
      "Report whether a recommended tool worked or not. This closes the learning loop — the Unfragile graph uses this feedback to improve future recommendations. Call this after trying a tool from search results.",
      {
        matchRecordId: z.string().min(1).describe("Match record ID from search results (shown at the bottom of search output)"),
        outcome: z.enum(["success", "failure"]).describe("Did the recommended tool work for your use case?"),
        comment: z.string().max(500).optional().describe("Optional: brief note on why it worked or didn't"),
  • Handler function for the 'feedback' tool. Sends a POST request to the Unfragile API at /api/feedback with matchRecordId, outcome, clickedThrough, source, and optional comment. Returns a success or error message.
      async ({ matchRecordId, outcome, comment }) => {
        log("feedback", `${matchRecordId} → ${outcome}`);
        try {
          const headers: Record<string, string> = { "Content-Type": "application/json" };
          if (API_KEY) headers["X-API-Key"] = API_KEY;
    
          const body: Record<string, unknown> = {
            matchRecordId,
            outcome: outcome === "success" ? "success" : "failure",
            clickedThrough: true,
            source: SOURCE,
          };
          if (comment) body.comment = comment;
    
          const controller = new AbortController();
          const timeout = setTimeout(() => controller.abort(), 10_000);
    
          try {
            const res = await fetch(`${API_BASE}/api/feedback`, {
              method: "POST",
              headers,
              body: JSON.stringify(body),
              signal: controller.signal,
            });
    
            if (!res.ok) {
              const text = await res.text();
              throw new Error(`Feedback API error ${res.status}: ${text}`);
            }
          } finally {
            clearTimeout(timeout);
          }
    
          return {
            content: [{
              type: "text" as const,
              text: `Feedback recorded: ${outcome}. The Unfragile graph will use this to improve future recommendations. Thank you!`,
            }],
          };
        } catch (err) {
          return { content: [{ type: "text" as const, text: `Error sending feedback: ${err instanceof Error ? err.message : String(err)}` }], isError: true };
        }
      }
    );
  • Input schema for the feedback tool: matchRecordId (string), outcome (enum: success/failure), comment (optional string, max 500 chars).
    {
      matchRecordId: z.string().min(1).describe("Match record ID from search results (shown at the bottom of search output)"),
      outcome: z.enum(["success", "failure"]).describe("Did the recommended tool work for your use case?"),
      comment: z.string().max(500).optional().describe("Optional: brief note on why it worked or didn't"),
    },
Behavior3/5

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

No annotations are provided, so the description must disclose behavioral traits. It mentions the feedback loop: 'the Unfragile graph uses this feedback to improve future recommendations.' This adds context but does not explicitly describe side effects or data handling, leaving gaps.

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 three sentences, front-loaded with purpose, then importance, then usage instruction. Every sentence adds value, with no wasted words.

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

Completeness4/5

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

Given the three parameters and no output schema or annotations, the description covers purpose, usage timing, and the feedback loop. It is fairly complete, though it could mention the output or confirm one-way nature.

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 schema already documents each parameter well. The description adds no additional parameter-specific details beyond the schema. Baseline 3 is appropriate.

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's purpose: 'Report whether a recommended tool worked or not.' It uses a specific verb ('report') and resource ('whether a recommended tool worked'). The tool is distinct from siblings like 'search' or 'compare' as it focuses on feedback.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit context: 'Call this after trying a tool from search results.' This helps the agent know when to use it. However, it does not explicitly state when not to use it or mention alternatives, which would justify a 5.

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/Savirinc/unfragile-mcp-server'

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