Portward
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DO_NOT_TRACK | No | Set to "1" to turn usage counts off for good and prevent Portward from asking about them. | |
| PORTWARD_HOME | No | Overrides the folder where Portward stores its app data, including portward.db. | |
| PORTWARD_USAGE | No | Set to "off" to turn usage counts off for good and prevent Portward from asking about them. | |
| PORTWARD_SHARE_URL | No | Overrides the Portward share service URL. | https://share.portward.ai |
| PORTWARD_ACCOUNT_URL | No | Overrides the Portward account service URL. | https://signup.portward.ai |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Portward lets you query the user's own databases and CSV or Excel files read-only. Call list_sources to see the sources, tables and columns, then query with one SELECT. Notes on tables and columns are the user's own words on what they mean: follow them when you write the SQL. Where the user has a results panel, the rows show to them and you get only the rows they put in the chat: their message gives a selection id, and get_selection with that id returns those rows. Otherwise you get a short preview. The user can block tables and columns; those are never sent to you, so don't try to work around a block. A source can run on the user's profiles instead: then you see only what its applied profiles grant, and nothing else exists for you. Its definitions are the user's approved meanings of their terms: use them, and cite the ones your answer relies on. Where the profile tools are listed, you may draft meanings and definitions for the user to approve (draft_meanings, draft_definition); a draft isn't used until they approve it. Metrics are the user's approved calculations ("MRR"): ask Portward for one with the metric tool instead of writing its SQL, so the number is the same every time. describe_metric gives a metric's full definition. Verified answers are questions the user has checked the answer to: when the user asks one of them, run it with run_verified_answer instead of writing SQL. If the user is new or has no sources yet, call get_started.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| queryA | Run one read-only SQL SELECT against a source. |
| rerunA | Re-run a past pull from history exactly: its stored SQL, unchanged, on the same source. |
| run_savedA | Re-run a saved pull by its name (see saved_pulls), exactly as it was saved. |
| tweakA | Tweak a past pull ('same, but last quarter'): run |
| kept_rowsA | Show the rows a past pull returned, if rows were kept for it (see keep_rows), without running it again. |
| compareA | Compare two pulls from history (e.g. a pull and its tweak): rows added, rows removed, rows whose numbers changed, and totals that moved, from |
| save_secretA | The panel's form sends what the user typed (a database password, the sharing code) for the ask in its _meta (or read with secret_request). App-only: the model never sees this tool, its input or result. |
| secret_requestA | The panel reads the form for an open ask (its request_id, in the visible result) when the host didn't hand it the result's _meta. App-only: the model never sees this tool or its result. |
| panel_rowsA | The results panel reads a pull's rows. App-only: the model never sees this result. |
| put_in_chatC | The results panel records the user's selection (row positions, column names) and gets the short chat message it posts: the selection's id, never its values. App-only. |
| value_sourceA | The results panel asks where one value came from (its row position and column name): the source tables and columns behind it and the query's filters. App-only. |
| share_linkB | The share panel reads a new share's link (its # part is the key) to show and copy. App-only: the model never sees this tool or its result. |
| share_mailB | The share panel's 'Open in mail app': opens a draft to the teammate with the link in the user's mail app. App-only. |
| add_sourceA | Connect a source; adding a name again replaces it. The file kinds take |
| update_passwordA | Have the user enter a new password for a database source (when it changed, or test_source says it's missing or wrong). Never takes the password: the user types it where you can't see it. The old password stays until the new one works. |
| usage_seenB | The results panel showed the user the usage-counts question. App-only. |
| usage_choiceC | The user turned usage counts on or off in the results panel. App-only. |
| personal_offerC | The user reached for something of Personal's in the results panel (moment "anonymised_or_totals" or "profile"): the offer to show there, the first time only. App-only. |
| dismiss_offerB | The user turned one kind of offer off for good in the results panel ("web", "profile" or "anonymised_or_totals"). App-only. |
| column_menuC | The results panel opens a column header's menu: the table column behind it, whether it is kept from the AI, and its note. App-only. |
| keep_from_claudeC | The user keeps a result column's table column from the AI, from its header in the results panel: a block rule, applied from the next result on. App-only. |
| column_noteB | The user writes or edits the note on a result column's table column from its header in the results panel; an empty note removes it. App-only. |
| level_previewA | The user chose Anonymise or Totals only from a column's menu in the results panel: that column of the result as the AI would get it at that level ("anonymised" or "totals"). Never for a column the user keeps from the AI. App-only: the model never sees this tool or its result. |
| more_rowsA | Send more rows of a pull than its preview. The user is asked first, every time; only call this when the preview isn't enough. |
| get_selectionA | Get the rows the user put in the chat from the Portward results panel: exactly the rows and columns they picked. Call it only with a selection id the user's message gave you ("use my selection sel_..."); don't guess ids or reuse a pull_id. You can read a selection again while it lasts (24 hours at most). |
| exportA | Export a past pull to a file on the user's machine: format 'csv' or 'xlsx' (Excel). Runs the pull's stored SQL again and writes every row; you get only the file's path. |
| test_sourceB | Test a connected source: says whether it opens, and if not, why. |
| matching_login_sqlA | Write setup SQL for a read-only database login that can read exactly what a connection's applied profiles grant (Postgres or Snowflake), for the user or their DBA to run, so the database itself hides what isn't granted. |
| remove_sourceB | Remove a connected source, and its password from the keychain. From claude.ai or ChatGPT on the web it only gives the command the user runs on their computer. |
| list_sourcesA | List the connected sources with the tables and columns the AI may use. |
| describe_sourceA | Browse one source's tables and columns, with the user's notes and which are blocked. |
| set_noteA | Write or edit the user's note on what a table, or one of its columns, means. Leave out |
| get_startedA | The first-run guide: call it when the user is new or has no sources. It says the next step (connect a source, then a first pull) and gives a query to try. use_sample=true connects a small sample database for a user with no file to hand. |
| historyB | Show the user's last pulls, newest first (for 'show my last pulls'). Each has an id that rerun takes. |
| lineageB | List a pull's lineage: the pull it tweaks (parent, and that one's ancestors) and the pulls that tweak it (children). |
| save_pullA | Save a pull from history under a name (e.g. 'Monthly revenue by region') so it can be re-run by name with run_saved. Saving a name again moves it to this pull. |
| saved_pullsA | List the saved pulls by name. run_saved re-runs one. |
| keep_rowsA | Turn keeping result rows on or off (off by default). When on, each new pull's rows are kept on this machine, encrypted with a key in the OS keychain, for 30 days; kept_rows shows them. |
| sent_to_aiA | Show what the AI was sent (for 'what did you see?'). With no conversation_id, list the conversations, newest first; with one, every response sent in it, in order. |
| usage_countsA | Anonymous usage counts: whether they're on and exactly what is counted and would be sent next. |
| set_usage_countsA | Turn anonymous usage counts off (on=false; the counts kept so far are deleted) or back on (on=true, once the user has been asked; Portward asks them itself). |
| open_pageA | Open the user's Portward page in their web browser, on this computer: their history, saved pulls, block rules, settings and what the AI was sent. Call it when the user asks to see or manage those. The page opens for the user; you aren't given its address. |
| blockA | Block a table, or one column of it, from the AI for good: it is never sent, whatever the query. Leave |
| unblockA | Remove a block rule so the AI can read that table or column again. Portward asks the user to confirm it themselves; only call this when the user asks for it. |
| list_rulesA | List the user's block rules: the tables and columns never sent to the AI. Leave |
| set_send_modeA | Switch how a source's results reach you. 'results' (Claude gets results): you get the rows straight away, at most 200, minus the columns the user keeps from you; Portward asks the user to confirm. 'pick' (I send rows myself): you get only the result's shape until the user sends rows. Only call this when the user asks for it. |
| share_sign_inA | Confirm the user's email for sharing, once per device: Portward emails them a code, and the user types it where you can't see it (never ask for it in the chat). |
| share_confirmA | Ask the user again for the code Portward emailed them (when the form or page closed before they typed it). Takes no code: the user types it where you can't see it. |
| shareA | Share a pull from history with a teammate by email: the table is encrypted on this machine and the link is shown to the user in the Portward share panel to copy and send (or open in their mail app from there; without a panel a draft opens in their mail app). You never see the link. The teammate opens it with a code emailed to them; it expires after |
| sharesA | List what the user has shared: who with, when, and when each share expires. |
| account_sign_inA | Sign this computer in to the user's Portward Personal account: opens the account page in their browser, where they sign in (emailed code, Google or GitHub) and approve. Then call account_status. Only call it when the user asks to sign in or to use their account. |
| account_statusA | Whether this computer is signed in to the user's Portward account, and as whom. |
| account_deleteA | Open the page where the user can download their Portward account data or delete their account, in their browser. It deletes nothing: the user signs in again there and confirms. Only call it when the user asks to download their account data, delete their account or leave Personal. History on this computer stays. |
| account_sign_outA | Sign this computer out of the user's Portward account (the token is ended on the server and removed from the keychain). |
| ai_logA | Show the AI log's summary (for 'what did my AI see?'): every read, with when, which AI app, the route, the profiles and versions that allowed it, the tables and columns at the level each was shown, and how many rows. Never the values. Optional start and end are dates (YYYY-MM-DD, both included). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| ui://portward/results.html | |
| ui://portward/password.html | |
| ui://portward/share.html |
TDQS
Scored across 55 tools
Many tools overlap in purpose: set_note vs column_note, block vs keep_from_claude, rerun vs run_saved vs tweak, history vs saved_pulls vs kept_rows, and share vs share_confirm vs share_sign_in vs share_link/share_mail. The rich descriptions help separate them (and many are marked app-only), but from the agent's vantage the set contains several near-duplicates that require careful reading to disambiguate.
Most tools use verb_noun (set_note, save_pull, add_source, list_rules), but a large minority are bare verbs (block, share, query, rerun, compare, tweak, export) or bare nouns (history, lineage, shares, account_status, saved_pulls). The conventions are readable but mixed, and pairs like share/shares and keep_rows/kept_rows are easy to confuse.
55 tools is far past what an agent can comfortably navigate, and much of the count comes from ~14 app-only panel/UI tools (panel_rows, put_in_chat, value_source, share_link, share_mail, usage_seen, column_menu, level_preview, etc.) that the model never invokes. The real model-facing surface is closer to 30-35, still heavy for the domain.
Coverage is unusually thorough: source connect/browse/test/remove, read-only query, pull history/rerun/tweak/compare/lineage, saved pulls, block rules, sharing lifecycle, account, usage counts, secrets, exports, and row-keeping. Minor gaps remain, e.g. no delete/rename for saved pulls or history entries, and no dedicated tool for viewing or managing stored definitions (only free-text notes/assumptions).