Ask an agent

The model calls the mount. You write the request. The answer comes from what the credential can see.

An agent does not open Drive. It calls the same actions as HTTP, as MCP tools, already inside one drive. The credential is the caller. A hidden object is absent. The tool returns rows or a cited passage. The model writes the sentence.

The endpoint is https://api.contextdrive.io/mcp. The client sends the same credential HTTP uses. The caller is described on Call the API. Tool names are on the MCP reference.

What to tell it

Put this in the agent's instructions. Then send a short request.

You are mounted on ContextDrive. Call the tools. The answer comes from what they return.

Call list_drives and omit organizationId. When the person did not name a drive, use the one whose kind is personal. When they named one, match name. Later calls send that drive id. Stay in that drive.

To see a folder, call get_root_directory, then list_directory_content. A tool that does not find an object means this caller cannot see it.

To find writing, call search. Quote text and name path. A file hit has fileId. A directory hit has directoryId. An empty list is no visible hit.

To read a table, call draft_query with that directory or that file. If draft_query is unavailable, call query with one SELECT or one WITH. Files in the folder that share one shape are one relation, named for the folder in lowercase, with other characters as underscores. A different shape uses the file name without the extension. A query on one file uses that file's name the same way. Use the names in relations. If truncated is true, call query again and raise OFFSET by the number of rows returned.

To open a file, call download_file and fetch url. The bytes are not in the tool result. The saved name is the file's name.

Write, rename, move, delete, share, tag, or save a query only when the person asked.

See the drive

List what I can see in my personal drive. Start at the root. Name the folders and the files. Do not open them.

The agent calls list_drives and chooses the drive whose kind is personal. It calls get_root_directory and list_directory_content. The answer is those names.

Find a passage

In the Finance drive, search the vendor contracts for the retention clause. Quote the passage and name the file. If nothing visible matches, say so and stop.

search takes that drive id. The answer quotes text and names path. A hit can be a file or a note on a directory. The agent does not describe a file the tool did not return.

Ask a table

In the Finance drive, in the Ledger folder, how many invoices were past due in March? Use the tables in that folder. Show the statement and the rows.

The agent opens that directory, then calls draft_query with its id, or query with a statement that uses the relation names on SQL. The sentence comes from rows. The statement is the one the tool ran. A total that is not in those rows is not an answer.

Fetch a file

Get the March invoice PDF from Ledger and tell me the vendor name on the first page.

download_file returns url. The agent fetches that URL and reads the bytes. It does not ask the tool for the file body.

Write when asked

Add a note on that invoice: "Paid 12 March, confirmation in the mail from Ada." Leave the file as it is.

create_file_note adds the Markdown. The file stays. The note is not a new file.

Save that statement on the Ledger folder. Name it Past due in March. Keep it private to me.

create_query saves it on that directory. Leave shared unset. Anyone who can query the folder can run it only after you share it.