Study guide
11.1 AI Coding Assistants, Context, MCP, and Test Review
Google Cloud Professional Cloud Developer Exam
Track your progress as you read
Finished sections get a check mark.
1 Chapter 1: Exam and Compute Platform Decisions
1.1 Current Exam, Sources, and Scenario Method 1.2 Cloud Run Execution and Platform Selection 1.3 GKE Modes and Compute Engine Trade-offs
2 Chapter 2: Container Engineering and API Contracts
2.1 Stateless Microservices and Multi-stage Builds 2.2 Container Hardening, Signals, and Layer Caching 2.3 REST, gRPC, and Protobuf Contracts
3 Chapter 3: gRPC Compatibility and Geographic Routing
3.1 Schema Evolution and gRPC Routing 3.2 Geography, Network Tiers, and Load Balancers 3.3 Serverless NEGs, Sessions, and Edge Controls
4 Chapter 4: API Management and Caching
4.1 API Management & Rate Limiting with Apigee and API Gateway 4.2 Memorystore and Cache Access Patterns 4.3 Cache Invalidation, Capacity, and Failover
5 Chapter 5: Messaging, Task Dispatch, and Orchestration
5.1 Event-Driven Messaging with Cloud Pub/Sub 5.2 Task Queues & Rate Throttling with Cloud Tasks 5.3 Event Routing and Service Orchestration: Eventarc & Cloud Workflows
6 Chapter 6: Resilience and Relational Availability
6.1 Designing Resilient Systems: Circuit Breaking, Retries & Failover 6.2 Cloud SQL Availability and Recovery 6.3 Connection Budgets and Spanner Consistency
7 Chapter 7: Distributed Schemas and NoSQL Data Models
7.1 Spanner Keys, Indexes, and Transactions 7.2 Firestore Data, Indexes, and Transactions 7.3 Bigtable Row Keys and Replication
8 Chapter 8: Object Storage and Application Identity
8.1 Cloud Storage Lifecycle and Signed Access 8.2 Workload Identity and Service Authentication 8.3 Secret Delivery, Rotation, and IAP
9 Chapter 9: Security, Data Integration, and Developer Credentials
9.1 Private Communication, Key Rotation, and Vulnerability Response 9.2 AlloyDB Schemas and BigQuery Ingestion 9.3 CLI Configurations, Local ADC, and Cloud Shell
10 Chapter 10: Managed Development and Automated Tests
10.1 Cloud Workstations and the Container Inner Loop 10.2 Emulating Google Cloud Services & Database Auth Proxies 10.3 Automated Testing Strategies: Unit, Integration, and Mocking
11 Chapter 11: AI Development Tools and Build Pipelines
11.1 AI Coding Assistants, Context, MCP, and Test Review 11.2 Cloud Build Workers and Step Dependencies 11.3 Builders, Substitutions, Triggers, and IAM
12 Chapter 12: Artifact Security and Admission Policies
12.1 Artifact Management and Vulnerability Scanning with Artifact Registry 12.2 Build Provenance and Admission Concepts 12.3 Attestors, Policy Enforcement, and Break-glass
13 Chapter 13: Cloud Run and GKE Deployment Configuration
13.1 Cloud Run Deployment and Scaling Configuration 13.2 Cloud Run CPU, Private Egress, and Secrets 13.3 GKE Workload Controllers and Gateway Routing
14 Chapter 14: Kubernetes Resources, Health, and Progressive Releases
14.1 GKE Resources, OOM Diagnosis, and Autoscaling 14.2 Container Health Probes, Lifecycle Hooks & Graceful Shutdown 14.3 Progressive Delivery: Traffic Splitting, Canary, and Blue/Green Rollouts
15 Chapter 15: Source/Event Deployment and Cloud API Integration
15.1 Source Deployment, Event Receivers, and API Versions 15.2 Client Libraries, Service Enablement, and ADC 15.3 API Responses, Pagination, Caches, and Retries
16 Chapter 16: Tracing, Sampling, and Monitoring
16.1 Trace Context and OpenTelemetry Export 16.2 Custom Spans, Trace Analysis, and Sampling 16.3 Application Metrics, Health Checks & Alerting with Cloud Monitoring
17 Chapter 17: Structured Logs, Routing, and Error Management
17.1 Structured Logs, Trace Correlation, and Queries 17.2 Log Routing, Export Destinations, and Exclusions 17.3 Error Reporting Formats and Regression Handling
18 Chapter 18: Profiling, Generative AI, and Assisted Troubleshooting
18.1 Cloud Profiler Types and Flame Graph Analysis 18.2 Generative AI Integration with the Google Gen AI SDK 18.3 Evidence-Based Troubleshooting with AI Assistance
11.1 AI Coding Assistants, Context, MCP, and Test Review
Key Takeaways Explain This Topic AI
Provide the assistant the relevant contracts, configuration and failure evidence; excessive irrelevant context can obscure the actual requirement.
Model Context Protocol servers expose tool capabilities and can act with the permissions of their execution identity.
Generated unit tests need independently chosen expected outcomes and failure cases, not only a copy of the implementation.
Run local deterministic checks before isolated integration tests that verify real IAM and network behavior.
AI suggestions remain untrusted proposals until their code, dependencies, permissions and results are reviewed.
Last updated: October 2026
AI-Assisted Development and Testing
The current blueprint explicitly includes AI tooling in the development environment and writing unit tests with an AI coding assistant. These tools can accelerate scaffolding, explanations, refactoring and debugging, but they do not remove the developer's responsibility for the application contract. An exam scenario may ask for a productive workflow that also preserves identity, data and execution boundaries.
Configure the Environment Deliberately
Use supported IDE integrations, such as Gemini Code Assist , alongside the Cloud SDK and the repository's language toolchain. Tool availability differs by edition, IDE and agent mode. Gemini Cloud Assist is a separate cloud assistance surface; an IDE coding assistant and an infrastructure investigation do not necessarily have the same tools or permissions.
Set the intended project, account and region for any cloud-aware tool. A generated deployment command can be syntactically valid and still target the wrong project. Named gcloud configurations do not automatically change a local application's ADC identity. Before a tool is allowed to run, understand whether it uses the developer's credentials, a configured service identity, a local process environment or a remote server's credentials.
Keep secrets, production records and unnecessary personal information out of prompts and source attachments. Enterprise controls and terms depend on the chosen product/edition, but they do not authorize disclosing data the developer is not permitted to share. Use synthetic inputs when a failing case can be reproduced without real customer data. A token pasted into a prompt remains a credential exposure even if the surrounding question is about security.
Context Engineering for a Concrete Change
Context engineering means selecting the information the assistant needs to reason about the task. Supply the relevant interface, required invariants, nearby implementation, tests, error output and constraints. Distinguish observed evidence from hypotheses. A stack trace is evidence that an exception occurred; the assistant's suggestion that the database is overloaded is a hypothesis to check.
For example, ask for a Pub/Sub payment consumer that commits a processed-event receipt and balance change atomically, then acknowledges after commit. Include the database transaction interface and expected behavior for duplicate events. If the prompt only says make the subscriber faster, the assistant may suggest acknowledging early or removing transactions, violating the requirement even if throughput improves.
Ask for a small reviewable change and a description of assumptions. Compare proposed service behavior with current official documentation, especially defaults, API names and limits. A plausible example may contain an invented Cloud Build field or an obsolete SDK import. Do not accept code merely because it looks idiomatic or is accompanied by an assertion that tests passed.
MCP and Agent Tool Boundaries
Model Context Protocol (MCP) lets a client discover and invoke capabilities exposed by a server. It is a protocol for connecting tools and context, not a grant of cloud permission or proof that the server is trustworthy. A local server can run code with the permissions of its process; a remote server can exercise its configured credentials. Review the server source/package, requested scopes, endpoints and update mechanism before connecting it.
Prefer narrow read-only tools when investigating. A tool that lists service configuration needs fewer permissions than one that can deploy containers or modify project IAM. Restrict environment variables and filesystem access available to local tool processes, and use a dedicated test project for development automation. Avoid attaching a broadly privileged production identity simply to make a generated workflow convenient.
Treat repository files, tool responses, issue text and retrieved documentation as data that may contain misleading instructions. An embedded request to upload credentials or disable a policy should not gain authority because an assistant read it through a tool. Enforce sensitive operations in application/tool authorization, and retain an audit record of actual executions. A model's natural-language intention is not an execution receipt.
Write Tests from Expected Behavior
An assistant can propose unit tests, but the developer must specify the expected outcome independently of the code being tested. For a financial operation, useful cases include insufficient funds, duplicate event IDs, transaction failure, and retry after an ambiguous commit response. A test that mocks every internal method to return success and asserts the same calls occurred can pass while the business invariant is broken.
Use dependency injection for external services so unit tests can run with deterministic clocks, IDs and failure responses. Keep the abstraction narrow enough to represent the behavior the application consumes. Verify a timeout path and an authorization denial as well as a happy path. If the implementation and test are generated from the same mistaken assumption, an independent contract assertion is especially valuable.
- Test case Expected invariant Failure it catches
- Duplicate payment event Balance changes once Receipt and effect not committed together
- Retryable transaction abort Whole transaction is retried safely Replaying only the final write
Cloud API permission denied No blind retry loop or broadened role Treating an authorization failure as transient load
- Delayed message processing Bounded eventual assertion A fixed sleep that makes CI flaky
- Model-generated command Correct project and allowed action Valid syntax with the wrong target/authority
- Integrate and Debug with Evidence
Run formatting, static checks and relevant unit tests locally. Read the results rather than trusting an assistant's report. A proposed test has not run until the runner produces an actual result. Where a service emulator lacks IAM, networking or production behavior, add isolated cloud integration checks for those boundaries. Do not claim that an emulator proves a production role binding or VPC route works.
In Cloud Build, make tests explicit steps with reliable exit codes and dependencies. Keep test resources and data unique per run, implement cleanup, and preserve enough output to investigate failures. Ask an assistant to explain a failing trace or propose a smaller reproduction, then verify that reproduction before editing unrelated infrastructure.
Finally, review the diff for new dependencies, broad IAM permissions, hidden network requests and behavior changes outside the requested task. AI-assisted development is most effective when proposals remain small, expected behavior is explicit, and execution results are independently observed. That workflow improves speed without converting confident text into evidence.
Sources checked October 18, 2026: Code Assist workflow , agent mode and MCP , security and privacy .