Everything below is the documented surface, read from api.kosmobids.com/docs and /api/v1/schema on 30 November 2026. The prompt is written to be copied; it has not been run against a customer key.
- Give the model three jobs — a capability statement into a search, questions per tender, the go/no-go — and keep the rest out: the filter, thresholds, deadline arithmetic and fit label come from code.
- Claude and Copilot reach the same server at
https://api.kosmobids.com/mcpthrough onemcpServersobject. Nine tools cover the loop; the server publishes 29, and the ones you leave out are a control, not just a context saving. - The prompt is the deliverable: exact tool names, a fixed output shape, a citation rule, a refusal list. It belongs in
CLAUDE.md,AGENTS.mdor a system prompt, not in a chat window. - A monitor is a saved search marked
scheduledRun; the API never runs a clock. Your cron, or the product's, starts the run — the agent only reads what the run found.
An agentic tender pipeline: what the model decides, what code decides
The first agentic tender pipeline anyone builds is a script with a model in the middle, and it disappoints for a predictable reason: the model is asked to do what a WHERE clause does better. The API's own agent tutorial says it in one line — encode your commercial rules as deterministic code, not as prompt text (build-an-agent, read 30 November 2026). A rule in a prompt decays with context length; a rule in code runs before the model sees anything.
So a tender sourcing agent is three language jobs and a great deal of determinism.
| Decision | Who makes it | Why |
|---|---|---|
| CPV, country, value, deadline window | Code — one saved search | A stored filter cannot be talked out of itself; 10 per company, the eleventh answers 409 |
| Which matches are worth reading | fit from the run, then a cap of 10 | match, industry_match or not_match; finalScore.score 1–5 |
| Which ten to read deeply | The agent | It can hold "no ISO 27001 yet" against 200 pages |
| What to ask each document set | The agent, from a fixed menu plus two tender-specific questions | A framework agreement and a supplies lot are different animals |
| Whether a requirement disqualifies | The agent — quoted, page-cited, flagged for a human | The one place a wrong answer is expensive |
| Deadlines, day counts, currency | Code | A model subtracting ISO strings is a leap-year bug |
| Answering without documents | Nobody | The gap is the finding |
The three jobs left: brief to criteria (CPV codes, two countries, a deadline floor), questions per tender (certifications for a framework, penalties for supplies), and the write-up — one line of why, in a register a bid manager reads on a phone.
Connect Claude or Copilot to tender data over MCP
The server is https://api.kosmobids.com/mcp — Streamable HTTP, stateless, JSON-RPC 2.0, no SSE stream. Auth is the same company-scoped key as the HTTP API, as a Bearer token (x-api-key also accepted). No tool takes a companyId: identity comes from the key, so a model cannot reach another company's tenders by filling in a parameter wrongly. initialize, tools/list and ping answer without credentials, so you can read the schemas before you have a key; every tools/call needs one. MCP carries no x-rate-limit-* headers: a limited call is a tool error, so backoff lives in your runtime.
One config object covers both clients:
{
"mcpServers": {
"kosmobids": {
"type": "http",
"url": "https://api.kosmobids.com/mcp",
"headers": { "Authorization": "Bearer ${KOSMOBIDS_API_KEY}" }
}
}
}
Claude Code reads .mcp.json at the project root, or the command line: claude mcp add --transport http kosmobids https://api.kosmobids.com/mcp --header "Authorization: Bearer $KOSMOBIDS_API_KEY" (Claude Code MCP reference, read 30 November 2026 — strict about "type": "http" with a url). Copilot in VS Code reads the same object from a workspace-root .mcp.json and accepts a tools array — the allowlist below, in one field (VS Code MCP configuration, same week).
Then trim the surface. Nine tools are the loop:
| Step | Tool | HTTP equivalent |
|---|---|---|
| Discover | run_search | POST /search |
| Re-run a saved search | start_saved_search_run | POST /saved-searches/{id}/runs |
| Read scored matches | list_saved_search_run_matches | GET …/runs/{runId}/matches |
| Hydrate | get_tender_details | GET /tenders/{id} |
| Ask for documents | trigger_document_download | POST /tenders/{id}/documents/download |
| See what arrived | list_tender_files | GET /tenders/{id}/files |
| Read pages | get_document_pages | GET /documents/{fileId}/pages |
| Ask the documents | start_document_analysis | POST /tenders/{id}/analyze |
| Collect the answer | get_document_analysis | GET /analyses/{workflowId} |
Three more per project: get_notice_details (buyer contact and submission mechanics sit above the lot), find_look_alike_tenders, post_tender_api_comment. The rest — pipeline stages, tags, archive, saved-search CRUD — is a write surface the agent does not need, and 29 schemas cost context before the first question.
The tender agent prompt to copy
A tender agent prompt does four jobs, and they are separate paragraphs for a reason: a contract (when to stop rather than loop), an output schema (the same table every run), a citation rule, and a refusal list. Copy this, replace the first two lines, put it where your client reads standing instructions.
You are a tender analyst. You work for <COMPANY>, which does: <one paragraph: what
you sell, what you deliver, which countries, what you cannot do>.
You have kosmobids MCP tools over a European public-procurement index. You produce
one output: a shortlist a bid manager can act on, where every claim is traceable to
a page.
RULES, in order of precedence:
1. Never state a requirement, deadline, value or certification you have not read in
a tool result. From a title or description, label it "(notice text)".
2. Quote before you conclude. A requirement you call disqualifying gets the sentence
quoted plus fileId and pageNumber, from get_document_pages or the references[] of
get_document_analysis.
3. "Documents not ready" and "no documents" are answers, not errors. Report them and
stop reasoning about requirements — never fill the gap from the description.
4. Compute nothing. Use deadlines, day counts and values as printed. A null or
missing field is "unknown", never 0.
5. Fit is a signal: evaluation.fit filters, finalScore.score (1-5) only breaks ties
inside one run. Never compare scores across runs or searches.
6. Read only what this run returned. You do not create, edit or schedule monitors,
and you do not change criteria — that is the operator's job, in code.
7. Ask a human about value bands, partner or consortium requirements, and anything
that would enter the pipeline.
WORKFLOW:
1. Restate the brief as criteria: cpvCodes, contractingCountry,
submissionDeadlineAtLeastDays, min/max value. List what you left out, and why.
2. Call run_search once. If empty, widen one field, say which, call once more — do
not loop.
3. Take at most 10 candidates. For each, call get_tender_details first, always.
4. Drop a candidate only for a reason read in the detail, and record the reason.
5. Per survivor: trigger_document_download, then list_tender_files. Read
documentStatus. For a "processed" row use its fileId — not its id — with
get_document_pages, and pass startPage/endPage when a document exceeds 40 pages.
6. One analysis per tender, 3-5 questions from this menu: mandatory certifications;
bid bond; mandatory site visit or clarification meeting; minimum turnover or
reference contracts; submission formats; penalties and termination;
subcontracting limits. Add at most two tender-specific questions.
7. Poll get_document_analysis until isFinalStatus is true. If isStatusSuccess is
false, report it and stop that tender — a retry means a new analysis.
8. Then the output, and nothing before it.
OUTPUT (markdown, no preamble):
### Shortlist — <date>
| # | Tender | Buyer, country | Deadline | Value | Fit | Go/no-go | Why (one line) |
Per shortlisted tender:
- What they want: 3 bullets, each with a page citation.
- What would disqualify us: 1 bullet, with the quoted sentence.
- Ask the buyer: 1 bullet.
- Evidence: "N pages read across M documents", or "No documents available —
assessment based on notice text only".
NEVER: invent a buyer, value or deadline; attribute one tender's documents to
another; write to the pipeline; post a comment unless told to; present a score as a
probability; answer a requirements question from the notice description.
BUDGET: 10 tenders, 2 searches, 40 pages of document text per run. One poll per
step — waiting is the runtime's job.
FAILURES: 401/403 — stop, the key is wrong or lacks the role. 429 — wait, retry
once. 5xx — retry once, then report.
Three lines do most of the work. "Quote before you conclude" turns the model from an opinion into a summariser with a receipt — the only defence against the failure that gets agents deleted, a confident sentence about a certification that was never in the document. "No documents is an answer" stops it inventing an assessment of attachments nobody fetched. The budget prevents the expensive failure, which is not a wrong answer but forty tenders × twelve pages × a question set you did not choose.
The bid/no-bid decision it writes
A bid manager does not read thirty paragraph assessments. They read a column of go/no-go, the one line under it, and then they open the two that say go — which is why the output block is a table and not a report, and why the bid/no-bid decision is a sentence rather than a score: "go: 320 k€ framework, three cited certifications already held, deadline in 21 days".
Keep the score where it belongs: finalScore.score comes from the run, not the agent, and a 4 means something only inside one run. When the agent disagrees with a 4, that disagreement is the signal worth reading — so it sits in the line, not smoothed out of the table.
Scheduled monitors: AI agent tender monitoring that runs on a clock
A monitor is a saved search that something else's clock runs. The saved search carries criteria and an options object, and two fields decide whether it is a monitor at all: scheduledRun and autoApprove (/api/v1/schema, read 30 November 2026). The criteria are the fields an ad-hoc search takes — cpvCodes, contractingCountry, includeKeywords and excludeKeywords, minContractValueEur and maxContractValueEur, submissionDeadlineAtLeastDays, publishedDaysAgo, skipUnknownValue. A company holds ten, and the eleventh answers 409. That cap, not the model, shapes a monitoring setup, so name monitors after markets rather than after questions.
The API does not schedule runs for you; the automation tutorial has a Scheduling section that says so plainly — trigger runs from your own scheduler and let the polling loop handle completion (automate-a-saved-search). So there are two clocks, and you should pick one:
- The product's.
scheduledRun: trueis what the monitors screen at app.kosmobids.com runs: last run, the state it ended in, the search intents and CPV codes behind it, the match count.autoApprovedecides whether qualifying matches land in the pipeline or wait as previews;pipelineDefaultTagswithpipelineDefaultOwnerIddecide who they are routed to. A monitor whose matches end up owned by nobody is a newsletter. - Yours.
scheduledRun: falseand one cron entry that POSTs/saved-searches/{id}/runsat 06:40. The schedule lives in the repository, so it can be reviewed, diffed and rolled back — this is the version that survives a colleague leaving.
Daily is enough, and the index says why: median publish-to-index lag was 57 hours on a four-day sample of 48,158 notices, and 60 of 81 sources are read weekly or slower (26 November 2026). An hourly monitor mostly re-reads rows you already have. Calibrate to the source instead: pl-ezamowienia was read on 28 of 28 days, TED is near-daily, md-mtender arrives in batches — a monitor tuned to a batched source wakes up to nothing four mornings out of five.
Where the output goes is a decision for before the first run: matches filtered server-side with fit=match, capped at ten for the agent, written to a file, a Slack channel or an inbox. And a monitor that has never run should say so rather than show an empty list — the ten-monitor screen on our Kosmo at work page has one in exactly that state, on purpose.
What stays in Python: the tender monitoring pipeline under the agent
The agent is the reader at the end of the pipeline. The pipeline is the part that has to survive Tuesday, and it is small.
Keep three things in your own state, because the API has no job concept. The savedSearchId and the runId from the trigger response — run records you list also carry an id, and passing that to the matches call answers 404, which reads exactly like "nothing found". Then workflowId with the question text per questionId, since the API numbers questions in order. Then the tender ids already processed, so a rerun does not re-read everything.
import json, time, urllib.request
BASE = "https://api.kosmobids.com/api/v1"
HDR = {"x-api-key": KEY, "content-type": "application/json"}
def call(path, body=None):
req = urllib.request.Request(BASE + path, headers=HDR,
data=None if body is None else json.dumps(body).encode(),
method="GET" if body is None else "POST")
return json.load(urllib.request.urlopen(req, timeout=30))
run = call(f"/saved-searches/{SEARCH_ID}/runs", {"publishMatches": False})["data"]
run_id = run["runId"] # not the run record's "id" — that one 404s
for _ in range(60):
page = call(f"/saved-searches/{SEARCH_ID}/runs/{run_id}/matches?fit=match&limit=100")
if page["data"]["isFinalStatus"]:
break
time.sleep(5)
top = page["data"]["matchScores"][:10] # hand these ten to the agent, not forty
Three status vocabularies are the second-day bug: runs new → in_progress → done | error, analyses pending | running | waiting | retry then completed | failed | aborted, and downloads no endpoint at all — you watch the file list fill. Branch on isFinalStatus, with isStatusSuccess for the outcome. No webhooks in v1: polling is the only completion signal.
Throttle at 2/s: 3 requests a second, 100 a minute, 1,000 an hour per company, with tighter per-minute caps on search, analysis, look-alike and run triggers. Trigger with publishMatches: false until you trust the filter — publishing is a one-way door into a colleague's pipeline. The six-stage version of this loop, with an idempotent SQLite state table, is its own post; this is the minimum that keeps an agent fed.
One tender, end to end: where the tender API lies to you
| Step | Tool | Lies to you when | The check |
|---|---|---|---|
| Documents | trigger_document_download | 202 scheduled; 200 means already running or nothing to fetch, same body | The file list is the only way to tell |
| Files | list_tender_files | Two ids per row: id downloads, fileId is the processed document | Swap them and a 404 looks like a missing file |
| Pages | get_document_pages | A document still building answers 200, status: "new", empty pages | Confirm documentStatus is processed |
| Analysis | start_document_analysis | No processed document is a 409 "Documents not ready" | That is the document stage's answer arriving late |
| Poll | get_document_analysis | A failed workflow is a 200 with isStatusSuccess: false | Polling never turns it into a success |
| Output | — | A claim with no references[] entry | No reference, no sentence |
Each answer comes back with references[], each carrying fileId, pageNumber, regionIndex, uploadedFileId and filename — enough to open the page image and read the sentence the model leaned on. A pipeline that stores answers and drops references has stored an opinion.
Two costs to price first. Page text is not free: 12.3 pages per file on average, 787 at the maximum (19,529 files, 227,961 pages to 26 November 2026). At ~1,200 tokens a page an average document is 15k tokens and a technical pack 900k — hence the page range and the 40-page cap. Questions are capped at 1–20 per request, and analysis reads your company's own knowledge documents too: never merge analyses across tenants.
What an AI agent for tenders cannot fix
Most tenders have nothing to read. On 26 November 2026, 1,262 of 97,793 open tenders had files in the store, and 90 days came to 4,226 downloads. The agent's most common correct answer is "notice only", and a prompt that treats that as failure produces fluent nonsense instead.
Freshness is the index's. Median publish-to-index lag was 57 hours and more than two thirds of the sources are read weekly or slower, so "what came out today" is answered from a feed that may not have today.
Coverage has holes. Four EU members are TED-only (CY, IE, LT, LU). No OCR accuracy figure exists — 227,961 pages processed, no published measurement, ours included — and .dwg, .p7s and .zip attachments sit in the store unreadable by any text extractor.
The model adds fluency, not coverage. It will not surface a tender the filter excluded. If the filter is wrong you get a well-written shortlist of the wrong market, every morning, on a schedule.
The concession
If the questions never change and the run happens at 3am, do not use an agent. A fixed question set, a saved search and 120 lines of standard-library Python is cheaper, deterministic and wakes nobody — that is the six-stage pipeline post, the version I would put under cron.
The agent earns its cost when the questions change per tender, when the reader is a bid manager rather than a developer, and when you are exploring a market where you do not yet know what to ask. It is excellent at building the client and poor at running unattended. Most teams end up with both: the script holds the monitor and the state, the agent reads and writes the brief.
FAQ
What should a tender agent prompt contain?
A company paragraph, the tool surface it may use, a rule that nothing is stated without a page citation, a fixed output table, a stop condition with a per-run budget, and a refusal list. Without the output table you get a different essay every morning and no two runs to compare.
Can I use Claude or Copilot for tender search without MCP?
Yes — the HTTP API is plain JSON and any tool wrapper reaches it. Use five to nine narrow tools rather than one generic request(method, path): a narrow tool description is the prompt, and a generic one invites calls the API answers with an HTML error page. MCP is the shortcut, not a requirement.
Do I need a scheduler for AI agent tender monitoring?
You need a clock, not necessarily yours. Set scheduledRun: true and the product's monitors screen runs it; leave it false and trigger POST /saved-searches/{id}/runs from cron. The API itself schedules nothing — the only real decision is whose clock you want to be able to audit.
How do I build a tender monitoring pipeline in Python?
The standard library is enough: one urllib request to trigger the run, a poll on the matches endpoint until isFinalStatus, fit=match filtered server-side, the first ten handed to the agent, and the processed tender ids in a file or SQLite. The real work is the state, not the requests.
How do I stop the agent inventing requirements?
Hydrate before judging, require a quote with a page citation for anything disqualifying, and make "no documents" legal. Then spot-check: open references[].fileId and pageNumber and read the sentence. The prompt alone will not hold; the citation rule plus a human check does.
What does a run cost in tokens?
Budget by pages. Twelve pages average, 787 maximum, roughly 1,200 tokens a page: a 40-page cap is ~48k tokens per tender before the model reasons. Or let start_document_analysis read server-side — 3–5 questions is cheaper when you need six facts, not a synthesis.
Start with one monitor
Take the saved search you already trust, paste the prompt, and run it on ten matches before automating anything. The first run tells you whether the filter is right, whether your questions are the ones your bid team asks, and whether the documents exist — three answers no prompt engineering supplies. Then let the clock do the rest and keep the poll outside the model. Endpoints are on /api/, the server on /mcp/, the five-call document chain in the documents post.
Sources
- docs/reference/mcp — endpoint, stateless transport, Bearer auth, keyless discovery, 29 tools with HTTP equivalents, no rate-limit headers (read 2026-11-30).
- build-an-agent and automate-a-saved-search — the orchestration loop, deterministic rules, and Scheduling: the Public API does not schedule runs for you (read 2026-11-30).
/api/v1/schema— saved-searchoptions(scheduledRun,autoApprove,pipelineDefaultTags,pipelineDefaultOwnerId), the criteria list, 10 searches and409on the eleventh; saved-searches-and-runs and reference/limits forrunIdvs recordidand the rate windows (read 2026-11-30).- Claude Code MCP reference, VS Code MCP configuration reference —
--transport http,.mcp.json, thetoolsallowlist (read 2026-11-30). - Our own index, 26 November 2026: 1,262 of 97,793 open tenders with files; 4,226 downloads in 90 days; 19,529 files, 227,961 pages, 12.3 pages per file, 787-page maximum; 57 h median lag; 5,976 notices a day from 81 sources, 60 weekly or slower.
Sibling posts: tender analysis pipeline · tender documents API · tender MCP servers · tender APIs compared. For the reader who consumes the output: /for/bid-managers/ and /for/bid-consultants/.