# `arxiv__arxiv_list_categories`

**Arxiv List Categories**

List arXiv category codes and names. Useful for discovering valid category filters for arxiv_search. Lists subject classes only; arxiv_search also accepts a bare archive code (the part before the dot, e.g. "astro-ph" or "cs") to search a whole archive at once.

- Server: [arXiv](https://gateway.mcpharbor.dev/docs/servers/arxiv) (`dev.mcpharbor.gateway/arxiv`)
- Price per call: $0.0001 (100 micro-USD); only tools/call is charged
- Endpoint: `https://gateway.mcpharbor.dev/mcp` or `https://gateway.mcpharbor.dev/mcp/arxiv`
- Upstream tool: exposed by the provider; called through this gateway as `arxiv__arxiv_list_categories`
- Provider terms: <https://info.arxiv.org/help/api/tou.html> (verified 2026-09-19)
- Upstream API documentation: <https://info.arxiv.org/help/api/index.html>
- Rate limit: 20 requests per minute
- Attribution required: Thank you to arXiv for use of its open access interoperability. (requested, not required)

## Parameters

- `group` (string, optional): Filter by top-level group (e.g., "cs", "math", "physics"). Returns all categories if omitted. One of: `cs`, `econ`, `eess`, `math`, `physics`, `q-bio`, `q-fin`, `stat`.

## Example call

Request headers and body:

```http
POST /mcp HTTP/1.1
Host: gateway.mcpharbor.dev
Authorization: Bearer <your gateway API key>
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: arxiv__arxiv_list_categories
```

```json
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "_meta": {
      "io.modelcontextprotocol/clientCapabilities": {},
      "io.modelcontextprotocol/clientInfo": {
        "name": "example-agent",
        "version": "1.0.0"
      },
      "io.modelcontextprotocol/protocolVersion": "2026-07-28"
    },
    "arguments": {
      "group": "cs"
    },
    "name": "arxiv__arxiv_list_categories"
  }
}
```

A successful response:

```json
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "_meta": {
      "dev.mcpharbor.gateway/call": {
        "chargedMicroUsd": 100,
        "id": "<the id of this charge>"
      }
    },
    "content": [
      {
        "text": "<whatever the upstream tool returned>",
        "type": "text"
      }
    ],
    "resultType": "complete"
  }
}
```

This call costs $0.0001 (100 micro-USD). Reading this page and listing the tool cost nothing.
The `dev.mcpharbor.gateway/call` record in the result is the receipt for that charge. Each
POST is metered separately, so sending the same call again buys another one: see
[agent.txt](https://gateway.mcpharbor.dev/agent.txt), section 7, before retrying.

## Attribution

This provider requires the attribution below wherever you use results from its tools.
Reproduce it verbatim:

> Thank you to arXiv for use of its open access interoperability. (requested, not required)

## Tool definition

Exactly as `tools/list` returns it (free):

```json
{
  "_meta": {
    "dev.mcpharbor.gateway/pricing": {
      "currency": "USD",
      "pricePerCallMicroUsd": 100
    }
  },
  "annotations": {
    "readOnlyHint": true
  },
  "description": "List arXiv category codes and names. Useful for discovering valid category filters for arxiv_search. Lists subject classes only; arxiv_search also accepts a bare archive code (the part before the dot, e.g. \"astro-ph\" or \"cs\") to search a whole archive at once.",
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "group": {
        "description": "Filter by top-level group (e.g., \"cs\", \"math\", \"physics\"). Returns all categories if omitted.",
        "enum": [
          "cs",
          "econ",
          "eess",
          "math",
          "physics",
          "q-bio",
          "q-fin",
          "stat"
        ],
        "type": "string"
      }
    },
    "type": "object"
  },
  "name": "arxiv__arxiv_list_categories",
  "outputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "anyOf": [
      {
        "not": {
          "required": [
            "error"
          ]
        },
        "required": [
          "categories",
          "totalCount"
        ]
      },
      {
        "required": [
          "error"
        ]
      }
    ],
    "properties": {
      "categories": {
        "description": "arXiv categories matching the filter.",
        "items": {
          "additionalProperties": false,
          "description": "arXiv category — subject code, full name, and top-level group.",
          "properties": {
            "code": {
              "description": "Category code (e.g., \"cs.AI\").",
              "type": "string"
            },
            "group": {
              "description": "Top-level group (e.g., \"cs\").",
              "type": "string"
            },
            "name": {
              "description": "Full name (e.g., \"Artificial Intelligence\").",
              "type": "string"
            }
          },
          "required": [
            "code",
            "name",
            "group"
          ],
          "type": "object"
        },
        "type": "array"
      },
      "error": {
        "additionalProperties": {},
        "description": "Present when the call failed. Absent on success.",
        "properties": {
          "code": {
            "description": "JSON-RPC error code for this failure.",
            "maximum": 9007199254740991,
            "minimum": -9007199254740991,
            "type": "integer"
          },
          "data": {
            "additionalProperties": {},
            "properties": {
              "reason": {
                "description": "Machine-readable failure mode.",
                "type": "string"
              },
              "recovery": {
                "additionalProperties": {},
                "description": "Actionable next step for the caller.",
                "properties": {
                  "hint": {
                    "type": "string"
                  }
                },
                "required": [
                  "hint"
                ],
                "type": "object"
              },
              "retryable": {
                "description": "Whether retrying may succeed.",
                "type": "boolean"
              }
            },
            "type": "object"
          },
          "message": {
            "description": "Human-readable description of what went wrong.",
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "notice": {
        "description": "Guidance when the group filter returns no categories.",
        "type": "string"
      },
      "totalCount": {
        "description": "Total number of categories returned.",
        "type": "number"
      }
    },
    "type": "object"
  },
  "title": "Arxiv List Categories"
}
```
