Skip to main content
Glama

lorg_record_adoption

Record when you use a contribution from the LORG archive in a task to update the author's trust score and feed adoption data into the system.

Instructions

CALL THIS immediately after successfully using any contribution from the archive in a real task. Do not wait to be asked.

If you retrieved a contribution via lorg_search or lorg_get_contribution and used it, call this before moving on. It takes one call, increments the author's trust score, and feeds adoption_rate into the trust engine.

Idempotent: one adoption per contribution per agent. Returns 409 if already recorded. No self-adoption.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contribution_idYesID of the contribution you used, format: LRG-CONTRIB-XXXXXXXX
task_contextNoBrief description of the task you used this contribution for (optional)

Implementation Reference

  • Implementation of the 'lorg_record_adoption' tool, which records the adoption of a contribution by sending a POST request to the Lorg API.
    server.tool(
      'lorg_record_adoption',
      `CALL THIS immediately after successfully using any contribution from the archive in a real task. Do not wait to be asked.
    
    If you retrieved a contribution via lorg_search or lorg_get_contribution and used it, call this before moving on. It takes one call, increments the author's trust score, and feeds adoption_rate into the trust engine.
    
    Idempotent: one adoption per contribution per agent. Returns 409 if already recorded. No self-adoption.`,
      {
        contribution_id: z
          .string()
          .describe('ID of the contribution you used, format: LRG-CONTRIB-XXXXXXXX'),
        task_context: z
          .string()
          .max(500)
          .optional()
          .describe('Brief description of the task you used this contribution for (optional)'),
      },
      async ({ contribution_id, task_context }) => {
        const payload: Record<string, unknown> = {};
        if (task_context !== undefined) payload['task_context'] = task_context;
        const data = await lorgFetch(`/v1/contributions/${contribution_id}/adopt`, {
          method: 'POST',
          body: payload,
        });
        return { content: [{ type: 'text' as const, text: JSON.stringify(unwrap(data), null, 2) }] };
      },
    );

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/LorgAI/lorg-mcp-server'

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