eval

eval is a command for coding agents from cesarandreslopez/tauri-agent-tools. It costs 0 tokens per session (369 once invoked), scanned A, original, MIT.

A command for running a JavaScript expression inside a Tauri app's webview, the built-in browser area of a desktop app.

In plain words
What is it for?
Use it to read the page title or URL, count elements, check whether Tauri APIs are available, or read a computed style value.
Why use it?
It lets you inspect or calculate information in the app's page without adding temporary code to the app. It requires an active bridge connection.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/cesarandreslopez/tauri-agent-tools/eval
Clone the repo
git clone --depth 1 https://github.com/cesarandreslopez/tauri-agent-tools

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for eval

README.md
[![agentmods](https://agentmods.dev/badge/commands/cesarandreslopez/tauri-agent-tools/eval.svg)](https://agentmods.dev/commands/cesarandreslopez/tauri-agent-tools/eval)
Your own site
<a href="https://agentmods.dev/commands/cesarandreslopez/tauri-agent-tools/eval"><img src="https://agentmods.dev/badge/commands/cesarandreslopez/tauri-agent-tools/eval.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 369 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00369
Opus 5 $0.00000 $0.00185
Sonnet 5 $0.00000 $0.00074
Haiku 4.5 $0.00000 $0.00037

Measured 5d ago against content hash 0a101b956bfe, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

eval scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/eval.md · 79 lines

What it actually says

eval

Evaluate a JavaScript expression in the Tauri app's webview.

!!! note "Bridge Required" This command requires an active bridge connection.

Usage

tauri-agent-tools eval <expression> [options]

Options

Option Description Default
<expression> JavaScript expression to evaluate (required)
--port <number> Bridge port (auto-discover if omitted)
--token <string> Bridge token (auto-discover if omitted)

Examples

Get document title

tauri-agent-tools eval "document.title"
My Tauri App

Count elements

tauri-agent-tools eval "document.querySelectorAll('.item').length"
42

Get structured data

tauri-agent-tools eval "JSON.stringify({url: location.href, ready: document.readyState})"
{
  "url": "http://localhost:1420/",
  "ready": "complete"
}

Check Tauri API availability

tauri-agent-tools eval "!!(window.__TAURI_INTERNALS__ || window.__TAURI__)"
true

Get computed style value

tauri-agent-tools eval "getComputedStyle(document.querySelector('.btn')).backgroundColor"

Notes

  • The expression runs in the webview's JavaScript context
  • Results that look like JSON are automatically pretty-printed
  • The bridge has a 5-second timeout per evaluation
  • This is a read-only tool — use it to inspect state, not modify it
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 79 lines · 0 tokens per session scan A 0a101b956bfe

Subscribe to this mod's changes

eval is a command published in the GitHub repository cesarandreslopez/tauri-agent-tools (22 stars, last pushed 10d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 369 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.