Skip to main content
Glama

list_my_bounties

Retrieve your posted bounties with optional status filter, limit, and pagination.

Instructions

List bounties posted by the authenticated user. Filter by status. Requires TASKBOUNTY_API_KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoOptional comma-separated statuses, e.g. 'DRAFT,OPEN,AWARDED'.
limitNoMax items to return (default 25).
offsetNoOffset for pagination (default 0).

Implementation Reference

  • Handler for the 'list_my_bounties' tool: builds query params (status, limit, offset) and fetches GET /tasks/mine from the TaskBounty API with auth.
    case "list_my_bounties": {
      const params = new URLSearchParams();
      if (typeof a.status === "string") params.set("status", a.status);
      if (typeof a.limit === "number") params.set("limit", String(a.limit));
      if (typeof a.offset === "number") params.set("offset", String(a.offset));
      const qs = params.toString();
      return await tbFetch(`/tasks/mine${qs ? `?${qs}` : ""}`, {
        requireAuth: true,
      });
    }
  • Schema and tool definition for 'list_my_bounties': accepts optional 'status' (comma-separated), 'limit' (number), and 'offset' (number).
      name: "list_my_bounties",
      description:
        "List bounties posted by the authenticated user. Filter by status. Requires TASKBOUNTY_API_KEY.",
      inputSchema: {
        type: "object",
        properties: {
          status: {
            type: "string",
            description: "Optional comma-separated statuses, e.g. 'DRAFT,OPEN,AWARDED'.",
          },
          limit: { type: "number", description: "Max items to return (default 25)." },
          offset: { type: "number", description: "Offset for pagination (default 0)." },
        },
      },
    },
  • src/index.ts:275-277 (registration)
    Registration of all tools (including 'list_my_bounties') via ListToolsRequestSchema handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: TOOLS as unknown as typeof TOOLS,
    }));
  • tbFetch helper function used by the handler to make authenticated API calls to the TaskBounty API.
    async function tbFetch(
      path: string,
      init: RequestInit & { requireAuth?: boolean } = {},
    ): Promise<ToolResult> {
      const { requireAuth, headers, ...rest } = init;
      if (requireAuth && !API_KEY) {
        return {
          content: [
            {
              type: "text",
              text: "Missing TASKBOUNTY_API_KEY environment variable. Set it to your tb_live_* key from https://www.task-bounty.com/dashboard/api-keys.",
            },
          ],
          isError: true,
        };
      }
      const url = `${API_BASE}${path}`;
      const finalHeaders: Record<string, string> = {
        Accept: "application/json",
        ...(headers as Record<string, string> | undefined),
      };
      if (API_KEY) finalHeaders["Authorization"] = `Bearer ${API_KEY}`;
      if (rest.body && !finalHeaders["Content-Type"]) {
        finalHeaders["Content-Type"] = "application/json";
      }
    
      let res: Response;
      try {
        res = await fetch(url, { ...rest, headers: finalHeaders });
      } catch (err) {
        return {
          content: [
            {
              type: "text",
              text: `Network error calling ${url}: ${err instanceof Error ? err.message : String(err)}`,
            },
          ],
          isError: true,
        };
      }
    
      const text = await res.text();
      if (!res.ok) {
        return {
          content: [
            {
              type: "text",
              text: `HTTP ${res.status} ${res.statusText} from ${url}\n\n${text}`,
            },
          ],
          isError: true,
        };
      }
      return { content: [{ type: "text", text }] };
    }
Behavior2/5

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

No annotations are provided, so the description must convey behavioral traits. It mentions the API key requirement but does not disclose what happens if the user has no bounties, pagination behavior, sort order, error handling, or data format. For a list endpoint with no output schema, more behavioral context would be helpful.

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 two short sentences, including the vital API key requirement. Every word contributes useful information without redundancy or fluff.

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

Completeness3/5

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

Given the tool's simplicity (3 optional params, no output schema), the description is adequate but not comprehensive. It covers the core purpose, filtering, and authentication. However, it omits details like default ordering, whether the response includes pagination info, or behavior when no bounties match. For a simple list endpoint, this is minimally sufficient.

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?

The schema covers all three parameters with descriptions. The description adds 'comma-separated statuses' for the status parameter, which provides formatting guidance. However, the limit and offset descriptions in the schema are already clear (max items, offset). Thus the description adds minimal value beyond the schema.

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 it lists bounties posted by the authenticated user, with optional status filtering. This distinguishes it from sibling tools like list_open_bounties, which likely list all open bounties. The verb 'list' and resource 'my bounties' are specific.

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

Usage Guidelines3/5

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

The description mentions requiring TASKBOUNTY_API_KEY, which is a usage prerequisite. However, it does not explicitly state when to use this tool versus alternatives like list_open_bounties, get_bounty_submissions, or get_bounty_detail. The context from sibling names suggests its niche, but the description itself lacks guidance.

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/eliottreich/taskbounty-mcp-server'

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