# queryWolfram

**Identifier:** `wolfram_queryWolfram`

**Provider:** [Wolfram Alpha](https://kirha.com/providers/wolfram.md)

Query Wolfram Alpha computational knowledge engine. Returns structured plain text optimized for LLM consumption. Best practices: - Simplify queries to keywords (e.g., "France population" instead of "how many people live in France") - Use * for multiplication (e.g., "6*10^14" not "6e14") - Use single-letter variables (x, n, n1) - Include space between compound units (e.g., "ohm m" for ohm-meter) - Use named constants (e.g., "speed of light" not "299792458 m/s") - Make separate calls for multiple properties

## Run it with the CLI

```bash
kirha tools run wolfram_queryWolfram \
  --input '{
    "input": "<input>"
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "wolfram_queryWolfram",
  "input": {
    "input": "<input>"
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "assumption": {
      "description": "Disambiguation assumption (e.g., '*C.mercury-_*Planet-' for mercury as planet)",
      "type": "string"
    },
    "input": {
      "description": "Natural language query for Wolfram Alpha",
      "type": "string"
    },
    "latlong": {
      "description": "Lat/long coordinates (e.g., '40.42,-3.71')",
      "type": "string"
    },
    "location": {
      "description": "Location for geo-dependent queries",
      "type": "string"
    },
    "maxchars": {
      "default": 6800,
      "maximum": 10000,
      "minimum": 100,
      "type": "number"
    },
    "units": {
      "enum": [
        "metric",
        "nonmetric"
      ],
      "type": "string"
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "inputInterpretation": {
      "type": "string"
    },
    "result": {
      "type": "string"
    },
    "websiteUrl": {
      "type": "string"
    }
  },
  "required": [
    "context",
    "result",
    "websiteUrl"
  ],
  "type": "object"
}
```

-----

[All Wolfram Alpha tools](https://kirha.com/providers/wolfram.md) · [< Back to tools list](https://kirha.com/tools.md)